For Javascript, the prompt asks the following: Write a function that uses alert() to display pairs of number with one pair per line of the Celsius temperatures 0 through 20 and their Fahrenheit equivalents. The formula for converting a temperature from Celsius to Fahrenheit is F=(9/5)C+32 where F is the Fahrenheit temperature, and C is the Celsius temperature. Your function must use a loop to display the table.
Q: The following code snippet has an error, how can this be corrected so it prints: 123 Main Street? 1.…
A: EXPLANATION: In the line number 2, there is the concatenation which is performed between two…
Q: Write a program that asks a data entry specialist to input employee information as comma separateu…
A: I have provided PYTHON CODE along with CODE SCREENSHOT and OUTPUT SCREENSHOT----------
Q: Write a function that converts milliseconds to hours, minutes, and seconds using the following…
A: Steps to convert milliseconds to seconds, minutes, and hours as follows Total seconds = Milli…
Q: A palindromic prime is a prime number and also palindromic. For example, 131 is a prime and also a…
A: According to the Question below the Solution: Output:
Q: Write a JavaScript function named testGrade() that is able to do the following tasks: • First, pop…
A: EXPLANATION: - The testGrade function takes marks the user has scored using the prompt function.…
Q: Write Complete Code Fragments in space below. Remember your code should be well documented. A. that…
A: A C++ program is as follows, File name: "main.cpp" // Header files #include <iostream>…
Q: Write a program for The Carefree Resort named ResortPrices that prompts the user to enter the number…
A: C# is a general purpose multi-paradigm programming language developed and used by Microsoft. It…
Q: Create a program that receives a student's name as input and then outputs a threecharacter ID for…
A: String manipulation Methods in Java: toLowerCase(String): This method converts the string case from…
Q: Assume that nextWord is a String variable that has been given a String value consisting entirely of…
A: Assume that nextWord is a String variable that has been given a String value consisting entirely…
Q: What will happen in the following C code snippet? int a = 100, b = 200; int *p = &a, *q = &b; %3D…
A: The given code snippet is given by: int a=100,b=200;int *p=&a,*q=&b; p=q; The code snippet…
Q: Write a program that accepts four parameters "lowerLimit", "upperLimit", "A", and "B". The program…
A: Algorithm Start Var l, u Accept l from user Accept u from user for i=l to u, go to step 6 else to…
Q: a nonpalindromic prime number whose reversal is also a prime. For example, 17 is a prime, and 71 is…
A: We will define two function isPrime() to check a number is prime or not and another function called…
Q: Q2: Write a JavaScript function that accepts a number from a user as input and checks if the number…
A: I give the code in javascript along with output and code screenshots
Q: Write a java Script program that ask the user to enter a valid test grades, your program should…
A: PROGRAM CODE: var students = [['David', 80], ['Vinoth', 77], ['Divya', 88], ['Ishitha', 95],…
Q: Write a program using C++ language that prompts the user to input an integer between 0 and 35. The…
A: Input a number. IF number < 9 ,print the no. else provide the output acc. to asked in the…
Q: Write a program using a codeblock that consists of the following algorithm: num1 =4, num2= 4* 5-11,…
A: <!doctype html><html><head><title>Add Two…
Q: Write a program that calculates the factorial of a number N, where N is requested from the user.
A: Check the code below.
Q: Write a program that keeps prompting the user to enter the first character of his favorite car; and…
A: The user enters the first alphabet of the car and his/her car’s name get displayed.
Q: ger, print out, the string "bad value(s) in:" followed by the names of the variables that have bad…
A: As not specified I have solved the question using Python language Code: x = input("Enter value for…
Q: Suppose that num is an int variable. Consider the following C++ code. cin >> num;if (num >=…
A: complete code: #include <iostream> #include<cmath> using namespace std; //main method…
Q: Write a program to generate a random number between 1 - 100, and then display which quartile the…
A: Program Instructions:Use the header files, constants, seed and random number generator given in the…
Q: import undea oture Pro number randint(1,100) 2 The above code would generate a random number between…
A: Here, I have to provide a python solution to the above question.
Q: In python: How do I use a function to covert user input into title case with validating that the…
A: Here, you are asking to use a function to covert user input into title case with validating that the…
Q: Using Python to write a program that displays a square using the function DisplaySquare(n, ch). The…
A: PROGRAM CODE: def DisplaySquare(n,ch): for i in range(n): for i in range(n):…
Q: C++ Write a program that takes in a line of text as input, and outputs that line of text in…
A: Program approach: Including header files Starting the main function Initializing string variables,…
Q: Write a program that prompt the user to enter a food product category, and price in USD. The program…
A: C++ Program for above : #include <iostream> using namespace std; int main() { cout…
Q: Write a program that displays a given integer with the corresponding comma in place. Before, commas…
A: Answer: I have done code and also I have attached code and code screenshot as well as output
Q: PYTHON3 Complete the given function, encrypt_text that encrypts the variable text using the…
A: Solution: Given, The key will contain a word made up of the letters ‘u’ and ‘d’. The cipher…
Q: In Python Write a program that reads a string from the user containing a date in the form…
A: Here I have used the datetime package and imported the datetime and date module from it. Now I have…
Q: Create a program called countVowels.py that has a function that takes in a string then prints the…
A: Algorithm / Steps: Function countVowels definition with input_string as parameter Printing the…
Q: Write an application named DailyTemps that continuously prompts a user for a series of daily high…
A: Please find the answer below :
Q: Fox International sells pre-paid calling card with the following features: Calls to USo 1.2 cents…
A: Java program to create the Fox International Calling Card Calculator.This program takes account…
Q: Python please: Given an integer representing a 10-digit phone number, output the area code, prefix,…
A: phone_number = int(input()) x = str(phone_number) print("("+x[:3]+") "+x[3:6]+"-"+x[6:])
Q: In an alternate reality, chemistry Professors Hodge and Sibia have teamed up to design a chemical…
A: 1. loop until string length becomes 0 a. create new empty string temp b. loop for 0 to n…
Q: Write a program that does temperature converter", "- The user will enter if he wants the result in…
A: The following are steps needs to be taken for the given program: Asking user the temperature as…
Q: Old-fashioned photographs from the nineteenth century are not quite black and white and not quite…
A: Answer: I have written a python code and as well as code screenshot.
Q: Write a Python console application that prompts the user for a number. The application should return…
A: The asked code for the python program is given in the next step with explanatory comments.
Q: Q2/-A- What is printed by the following code fragment? Int x1=4 , y1, x2=6, y2; yl=++x1; y2=x2++;…
A: The code fragment given: int x1 = 4, y1, x2=6, y2; y1 = ++x1; y2 = x2++; x2 = y1++; cout…
Q: 1. Write a program that will allow a student to calculate his/her test average of four test scores.…
A: Code: import java.util.*;public class Main{ public static void main(String[] args) { //declaring…
Q: For your program, hard-code the temperature and property values for P = 5 MPa as lists for…
A: Answer:- def interpolate(temp2,temp1,val2,val1,temp_inp): return val1+…
Q: Write a program that displays a table of pounds and equivalent weights in kilograms. You can find…
A: As no output is provided and no language is specified, I have written the program in Python The code…
Q: Given ints temp, a and b, what code for XXX, YYY correctly swaps a and b? Choices are written as XXX…
A: Here the Value of a is assigned to tmp. tmp = a; And Value of b is assigned to a. a = b; Value of…
Q: Q2. Write a program that reports the contents of a compressed-gas cylinder based on the first letter…
A: C program
Q: Write a javascript program that calculates how much a person would earn over a period of time. if…
A: Please check step 2 & 3 for program and output
Q: Write a program to convert an integer to binary number. Ask the user to enter an integer and convert…
A: Write a C++ program to convert an integer to a binary number Answer: Given a decimal number as…
Q: C# Write a program for The Carefree Resort named ResortPrices that prompts the user to enter the…
A: Algorithm: Start Read enter the number of days for a resort stay n If n==1 or n==2,calculate cost…
Q: Write a program that prompts the user to enter twostrings and displays the largest common prefix of…
A: Since the programming language is not mentioned in the question, we will answer this question in the…
Q: Write a program that prompts the user to input the three coefficients a, b, and c of a quadratic…
A: Sample Response: #Python program to find the roots of quadratic equationimport math# function to…
Q: write a program that inserts parentheses, a space, and a dash into a string of 10 user-entered…
A: java code: import java.util.*; public class phoneNumberFormat{ public static void main(String[]…
For Javascript, the prompt asks the following: Write a function that uses alert() to display pairs of number with one pair per line of the Celsius temperatures 0 through 20 and their Fahrenheit equivalents. The formula for converting a temperature from Celsius to Fahrenheit is F=(9/5)C+32 where F is the Fahrenheit temperature, and C is the Celsius temperature. Your function must use a loop to display the table.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- Write a program using C++ language that prompts the user to input an integer between 0 and 35. The prompt should say Enter an integer between 0 and 35:. If the number is less than or equal to 9, the program should output the number; otherwise, it should output: A for 10 B for 11 C for 12 . . . and Z for 35. (Hint: For numbers >= 10, calculate the ACSII value for the corresponding letter and convert it to a char using the cast operator, static_cast<char>().) Please leave comments and an explanation as well as final source code. Thank you.Write a C# program named TestScoreList that accepts eight int values representing student test scores. Display each of the values along with a message that indicates how far it is from the average. An example of how the results should be output is as follows: Test # 0: 89 From average: 6 Test # 1: 78 From average: -5 Also like: Test # 0: 74 From average: 13.375 Test # 1: 65 From average: 4.375Write a program that creates the multi-panel plot shown below, for Planck curves at 4 different temperatures Planck Curves Use embedded noninteractive plotting and set the figure size to be 10x5 inches. • You may write your program in a single cell, or break it over multiple cells. Use a logarithmic x axes, and the logspace() function for generating the axes values. You will have to be careful with units on this one. For 50% extra credit have your program use a loop over the four axes, with all the plotting code contained within the loop (except for any subplot adjustments). 0.030 12 300K 1000K 0.025 10 0.020 FBBX (Wm-nm-1) FBBA (Wm-2nm-¹) 0.015 10 0.010 0.005 2 0.000 A (nm) λ (nm) 100000 3000 3000K 6000K 2500 80000 2000 60000 FBBA (Wm-2nm-¹) FBBX (Wm-2nm-1) 1500 40000 1000 20000 500 0 101 102 0 101 103 104 105 106 102 103 104 105 106 X (nm) λ (nm) python language
- Write a program that creates a login name for a user, given the user's first name, last name, and a four-digit integer as input. Output the login name, which is made up of the first five letters of the last name, followed by the first letter of the first name, and then the last two digits of the number (use the % operator). If the last name has less than five letters, then use all letters of the last name. Hint: Use the to_string() function to convert numerical data to a string.: Write a java Script program that ask the user to enter a valid test grades, your program******insearted with html file******should calculate the average, display the result on the screen and check the user enter a valid testgrade.• Declare and initialize the necessary variables. • Aske the user to enter the ID. • Display the average using header2. • Use a function to ensure the user enter a valid test grade (0 to 100), otherwise print amessage’ the grade is not valid. • Use a loop to aske the user to enter the test grades, -1 to stop the loop. • Print the output on a table. • Add page title with your id. • Your output should be as the following.In Chapter 4, you created a program that generates a random number, allows a user to guess it, and displays a message indicating whether the guess is too low, too high, or correct. Now, create a modified program called GuessingGame2 in which the user can continue to enter values until the correct guess is made. After the user guesses correctly, display the number of guesses made. Recall that you can generate a random number whose value is at least min and less than max using the following statements: Random ranNumber = new Random(); int randomNumber; randomNumber = ranNumber.Next(min, max);
- Write a simple 'for' loop in javascript. Iterate through numbers 1-10 and print eachnumber to the console please write this with a function in java form example function.somthing() and make an html file of the version as well pleaseIn python: How do I use a function to covert user input into title case with validating that the user entered alphabetical information? For example: def studyHours():#open StudentsHoursGrades.txthoursFile = open('StudentsHoursGrades.txt', 'a') #Ask Student's Namestudent = input('Please enter your first and last name: \n')#Validation that something was enteredwhile student == "":print('Please print a valid name. \n')student = input('Please enter your first and last name: \n')properCase(student) def properCase():while student.isalpha():student.title()python Write a program that does temperature converter", "- The user will enter if he wants the result in Celsius or in Fahrenheit. Use the input function to read this option. \n", "- Ask the user the value of the temperature he wants to convert. Use the input function to read this value and convert accordingly.\n", "- If the user wants the temperature in Fahrenheit compute: $ Fahrenheit = Celsius5/9+32$.\n", "- If the user wants the Celsius compute as follows: $ C = (F-32)5/9 $.\n", "\n", "Print the converted temperature and show the unit, like 23.5 C or 67.1 F."
- You are working on a text mining project where you have to do some operations on text. Develop a C++ console application that does the following: Prompt for and get two strings from the user (each string has more than 10 characters). Print the length of each string. Convert the 5th character of the first string to an uppercase character and print it. Convert the 10th character of the second string to a lowercase character and print it. Output values should be printed with left and right justified label Look at the sample input and output and check your console with two different inputs.Write a program that reads a four-digit integer, such as 2014, and then displays it, one digit per line in reverse order, like so: 4 1 0 2 Your prompt should tell the user to enter a four-digit integer. You can then assume that the user follows directions. (Hint: Use the division andm remainder operators.)You wish to display the following text using the print function in Python: >HSBGPG Human bone gla gene\transcript "BGP" GGCAGATTCCCCCTAGACODE What is the correct way to display this output in Python 3.xx? 2. A student is writing Python 3.xx code to read in a dna sequence using the following command: >>> dna=input("Enter a DNA sequence, please:"). The student tries three different ways to compute the index of the second occurrence of the string 'atg' in the dna sequence: A. >>> o1 = dna.find('atg') >>> dna.find('atg',o1+1) B. >>> dna.rfind('atg') C. >>> dna.find('atg',dna.find('atg')+1) Which one is the correct way?