Microwaves / Radio Waves If a scientist knows the wavelength of an electromagnetic wave she can determine what type of radiation it is. Write a program that asks for the wavelength in meters of an electromagnetic wave and then displays what that wave is according to the following chart. (For example, a wave with a wavelength of 1E-10 meters would be an X-ray.) 1x 10-11 1 x 10-8 4 x 10-7 7x 10-7 1x 10-3 1 x 10-2 Gamma Rays. X Rays Ultraviolet Visible Light Infrared
Q: Q3. (Dice Rolling) Write a program that simulates the rolling of two dice. The program should use…
A: Given:
Q: Convert pounds into kilograms) Write a program that converts pounds into kilo-grams. The program…
A: CODE:- import java.util.Scanner; public class Main { public static void main(String[] args) {…
Q: (Financial application: calculate tips) Write a program that reads the subtotal and the gratuity…
A: Actually, Java is a general-purpose also class-based, object-oriented programming language designed…
Q: (PYTHON) A nutritionist who works for a fitness club helps members by evaluating their diets. As…
A: - We yave to help the nutritionist with the code.
Q: (Prism Program) Write a program that can calculate the value of the surface area and volume of a…
A: As Programming language is not mentioned, taking C as reference. Inputs : Lenght, Width and Height…
Q: (Geometry: area of a regular polygon) A regular polygon is an n-sided polygon in which all sides are…
A: import java.util.Scanner; public class AreaOfAregularPolygon4_5 { public static void main…
Q: Java Program (Display the prime factors) Write a program that prompts the user to enter a positive…
A: In the java program, the necessary libraries are included for the Math and Scanner classes. Create a…
Q: (Area and perimeter of a circle) Write a program that displays the area and perimeterof a circle…
A: Program code: //Class definition Circle public class Circle { //Main function public static void…
Q: Credit Card Number CheckThe last digit of a credit card number is the check digitwhich protects…
A: Note : I have used java programming language since it is not mentions which language to be used to…
Q: Write a program that prompts the user to enter the number of hours a car is parked at the airport…
A: Assuming the formula, Parking fee, F is calculated as 5, 0 ≤ h ≤3F = {6 ×int (h+1),…
Q: Part B: Chore Bonus Your parents pay you $3 for each trash bag full of leaves you rake. If you can…
A: According to the information given:- We have to follow the instructions mentioned to get the desired…
Q: Alphabetic Telephone Number Translator Many companies use telephone numbers like 555-GET-FOOD so the…
A: Program: // Import the required packagesimport java.util.Scanner;import java.lang.String;// Class…
Q: Guess-the-number-game: Write a program that pays the game of “guess the number” as follows: Your…
A: Since the programming language is not mentioned in the question, we will answer this question in the…
Q: 1- Get a number from user. 2- If the number is not divisible by 5 then find out how much more you…
A: Summary: In this question, we have to write a program in C++. In the program, we have to take a…
Q: 2) triangle.py Write a program that will ask the user to input three positive numbers in descending…
A: Given, 3 numbers from the user which are descending in nature. Let us consider those 3 numbers are…
Q: (Cost of driving) Write a program that prompts the user to enter the distance to drive, the fuel…
A: Since, the programming language is not mentioned, below is the complete c++ program:
Q: Alphabetic Telephone Number Translator Many companies use telephone numbers like 555-GET-FOOD so the…
A: Python: It is one of the easiest programming language. It is a concise (less)code. It is a…
Q: (Comparing Integers) Write a program that prompts the user to enter the edges of a triangle and…
A: PROGRAM CODE: #include<iostream>using namespace std;int main(){ int side1, side2, side3; cout…
Q: (Financial application: calculate tips) Write a program that reads the subtotal and the gratuity…
A: //Whenever if you asked programming related questions you should always have to specify in which…
Q: (Financial application: calculate future investment value) Write a program**(PYTHON)** that reads in…
A: First, we will input the investment amount, annual interest rate, and the number of years. Then…
Q: 5. (Algebra: solve 2 x 2 linear equations) You can use Cramer's rule to solve the following 2 X 2…
A: Step-1: StartStep-2: Declare variables a, b, c, d, e, f, x, y, valueStep-3: Take input from user a,…
Q: Program 4) Body Mass Index (BMI) is a measure of health based on weight. It can be calculated by…
A: As the language is not specified answer written in c++
Q: A prime number is a whole number greater than 1 whose only can be divided by itself and 1. Thus,…
A: code in c++ #include <iostream> using namespace std; int main() { int n, i, m = 0, flag…
Q: 12: guess.cpp) Write a program that plays a guessing game with the user. The user should pick a…
A: Code : #include <iostream> using namespace std; int main() { /* Welcome the user and…
Q: 5. Alphabetic Telephone Number Translator Many companies use telephone numbers like 555-GET-FOOD so…
A: Python program code: a=input("Enter a telephone number XXX-XXX-XXXX: ") #user inputb=a.split('-')…
Q: (Display the day and remaining hours) Write a program that prompts the user to enter the day number…
A: Given:- (Display the day and remaining hours) Write a program that prompts the user to enter the day…
Q: (Physics: acceleration) Average acceleration is defined as the change of velocity divided by the…
A: Precise Acceleration is characterized as the time pace of progress of rakish speed. It is normally…
Q: - First and Last Design a program that asks the user for a series of names (in no particular order).…
A: Python code to print the first and last name from user input names is given below.
Q: (Area and perimeter of a rectangle) Write a program that displays the area and perimeterof a…
A: Objective: This program would display the area and perimeter of a rectangle whose width would be 5.3…
Q: atures of the water. The formula to compute the energy is Q = M * (finalTemperature –…
A: Code: import java.util.Scanner; public class Main { public static void main(String[] args) {…
Q: (Area and perimeter of a rectangle) Write a program that displays the area and perimeter of a…
A: Algorithm: The algorithm to find the area and perimeter of the rectangle is: Start w=4.5 h=7.9…
Q: 2.15 (Geometry: area of a hexagon) Write a program that prompts the user to enter the side of a…
A: here in this question we have asked to write a program which take hexagon side from the user and…
Q: PART 2) BRANCHING Write a quadratic equation solver. Ask the user to type in three numbers: a, b,…
A: Dear learner, hope you are doing well. I will try my best to answer this question. Thank You!!
Q: Financial application: compute future apartment rent) Suppose that the rent for an apartment is…
A: The problem is based on finding the rent of the apartment using programming. NOTE: The code is…
Q: circles) Write a program that prompts the user to enter the center coordinates and radii of two…
A: Here is the Java program according to the problem given: import java.util.Scanner; public class…
Q: 5-WRITE A PROGRAM THAT CALCULATES A STUDENT'S AVERAGE IF IT IS LESS THAN 50, SPECIFYING THE…
A: As per company guidelines we are suppose to answer only 1 question. Kindly re-post other…
Q: (Health application: BMI) Body Mass Index (BMI) is a measure of health on weight. It can be…
A: Code import java.util.Scanner;public class test{ public static void main(String args[]){…
Q: Q4: (Find the two lowest scores) Write a program that prompts the user to enter the number of…
A: GIVEN: Create a Java program that prompts the user to enter the number of students and each…
Q: Day Calculation Background - Many times one needs to do calculations on dates. Programs like Excel…
A: Program Description : The C++ program prompts the user to enter day, month, and year values from the…
Q: Body mass index (BMI) is a measure of health based on weight. It can be calculated by taking your…
A: Given: Body mass index (BMI) is a measure of health based on weight. It can be calculated by taking…
Q: (Financial application: calculate future investment value) Write a program that reads in an…
A: Convert the interest rate from annual interest rate to monthly interest rate
Q: (Dice Rolling) Write a program that simulates the rolling of two dice. The program should use rand…
A: #include <stdio.h>#include <stdlib.h>#include <time.h> int main() {…
Q: (Algebra: solve 2 x 2 linear equations) You can use Cramer's rule to solve the following 2 x 2…
A: python program: #This code is for python3. #Prompt the user for input. a = float(input("Enter a: "))…
Q: utput Format Print a single line containing the name of month. Be careful about the newline ('\n')…
A: Note: Since you have not provided the language to write the code so I am using Java language to…
Q: C Program / C Language Make a C program. The date is january 1, 2019. Cody has a lot of neighbors…
A: Here, I have to write a C code to the above question.
Q: Write a program that prompts the user to enter the edges of a triangle and compares them. If all…
A: In the solution of given problem, we need to use Else-If ladder statement to test the conditions. An…
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
- Collatz Sequence: In 1937, Lothar Collatz proposed that no matter what number you begin with, the sequence eventually reaches 1. This is widely believed to be true but has never been formally proved. Write a program that inputs a number from the user, and then displays the Collatz Sequence starting from that number. Stop when you reach 1. If n is even, divide it by 2 to get n / 2. If n is odd, multiply it by 3 and add 1 to get 3n + 1. Repeat the process indefinitely. Find out and print the maximum number that you can get in these calculations. ' Part-3: Please enter a number: 2051 6154 3077 9232 4616 2308 1154 577 1732 866 433 1300 650 325 976 488 244 122 61 184 92 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1 The maximum number you get: 9232Use C Language Airline Reservation System A small airline has just purchased a computer for its new automated reservations system. The president has asked you to program the new system. You are to write a program to assign seats on each flight of the airline's only plane (capacity: 10 seats). Your program should display the following menu of alternatives: Please type 1 for "first class" Please type 2 for "economy" If the person types 1, then your program should assign a seat in the first class section (seats 1-5). If the person types 2, then your program should assign a seat in the economy section (seats 6-10). Your program should then print a boarding pass indicating the person's seat number and whether it is in the first class or economy section of the plane. Use a single-subscripted array to represent the seating chart of the plane. Initialize all the elements of the array to 0 to indicate that all seats are empty. As each seat is assigned, set the corresponding elements of…1. Write a program that lets the user guess whether a randomly generated integer would be even or odd. The program randomly generates an integer and divides it by 2. The integer is even if the remainder is 0, otherwise odd. The program prompts the user to enter a guess and reports whether the guess is correct or incorrect.
- Widgets and Gizmos An online retailer sells two products: widgets and gizmos. Each widget weighs 75 grams. Each gizmo weighs 112 grams. Write a program that reads the number of widgets and the number of gizmos in an order from the user. Then your program should compute and display the total weight of the order.PYTHON programming solotion Develop a program that allows the user to enter a start value of 1 to 4, a stop value of 5 to 12 and a multiplier of 2 to 8. The program must display a multiplication table with results using these values. For example, if the user enters a start value of 3, a stop value of 7 and a multiplier value of 3, the table should be displayed as follows: Multiplication Table 3 x 3 = 9 3 x 4 = 12 3 x 5 = 15 3 x 6 = 18 3 x 7 = 21 additionally Each multiplication problem must be displayed with a problem number. The program must prompt the user to enter an answer to each of the multiplication problems. The correct answer should be displayed after the user enters an answer. A message should be displayed informing the user that the answer entered was correct or incorrect followed by an appropriate motivating comment. A running record of the number of correct and incorrect responses must be kept. After all the problems have been presented the user must be informed of…PYTHON code that finds the prime divisors of a number entered on the keyboard and prints it on the screen write. (For example, the prime divisors of 10 are 2 and 5. The prime divisors of 20 are 2 2 and 5. Truck.)
- Problem: A small company needs an interactive program to compute an employee’s paycheck. The payroll clerk will initially input the data, and given the input data, an employee's wage for the week should be displayed on the screen for the payroll check. The data for the employee includes the employee's hourly pay rate and the number of hours worked that week. Wage is equal to the employee's pay rate times the number of hours worked (up to 40 hours). If the employee worked more than 40 hours, wage is equal to the employee's pay rate times 40 hours plus 1½ times the employee's pay rate times the number of hours worked above 40. Instructions: Match the action at the left-side with the correct step number at the right-side (the attached picture). Note that it may be possible to group more than one related actions in the same logical step / process without altering the essence of the algorithm. In the program flow, input and checking of hourly pay rate should come before that of the number…15. Speed Conversion ChartYour friend Amanda, who lives in the United States, just bought an antique European sports car. The car’s speedometer works in kilometers per hour. The formulafor converting kilometers per hour to miles per hour is:MPH = KPH * 0.6214In the formula, MPH is the speed in miles per hour and KPH is the speed in kilometersper hour. Amanda is afraid she will get a speeding ticket, and has asked you to write aprogram that displays a list of speeds in kilometers per hour with their values convertedto miles per hour. The list should display the speeds from 60 kilometers per hourthrough 130 kilometers per hour, in increments of 5 kilometers per hour. (In otherwords, it should display 60 kph, 65 kph, 70 kph, and so forth, up through 130 kph.) made in visual studio 2017Odd Even Number Problem Description Even Numbers are integers that are exactly divisible by 2, whereas an odd number cannot be exactly divided by 2. Example of even numbers are 2,4,6,8 and odd numbers are 1, 3, 5, 7, 9. Input The first line input contains an integer, which determines the number of test cases. Each of following lines represent sequence of integers that ends with 0. 2 34 1 8 5 22 0 10 7 16 -2 0 Output For each test case, the output will present the size of oddQueue and evenQueue following with the integers of odd and even numbers. oddQueue 2: 1 5 evenQueue 3: 34 8 22 oddQueue 1: 7 evenQueue 3: 10 16 -2 ** Your task is to write a program that will read the input and identify whether it is an odd number or even number. /******************************************************************************* Compilation: javac Queue.java** The Queue class represents a first-in-first-out (FIFO) queue of generic items.* It supports the usual enqueue and dequeue…
- Interest Rates Savings accounts state an interest rate and a compounding period. If theamount deposited is P, the stated interest rate is r, and interest is compounded m timesper year, then the balance in the account after one year is P⋅(1+rm)m. For instance, if$1000 is deposited at 3% interest compounded quarterly (that is, 4 times per year), thenthe balance after one year is1000⋅(1+.034)4=1000⋅1.00754=$1,030.34.Interest rates with different compounding periods cannot be compared directly.The concept of APY (annual percentage yield) must be used to make the comparison. TheAPY for a stated interest rate r compounded m times per year is defined byAPY=(1+rm)m−1.(The APY is the simple interest rate that yields the same amount of interest after oneyear as the compounded annual rate of interest.) Write a program to compare interestrates offered by two different banks and determine the most favorable interest rate. SeeFig. 4.24.Box Office: A movie theater only keeps a percentage (20%) of the revenue earned from ticket sales. The remainder goes to the movie distributor. Write a program that calculates a theater’s gross and net box office profit for a night. The program should ask for the name of the movie, and how many adult and child tickets were sold. (The price of an adult ticket is $10.00 and a child’s ticket is $6.00.) Input: the name of the movie, number of adult tickets sold, number of child tickets sold Output: as specified below Object: cin, cout, getline, format output Note: 1. Movie names contain spaces 2, the report is aligned. 3. The decimal number is displayed with 2 decimal places.Fat Percentage Calculator One gram of fat has 9 calories. If you know the number of fat grams in a particular food, you can use the following formula to calculate the number of calories that come from fat in that food: Calories from fat = Fat grams × 9 If you know the food’s total calories, you can use the following formula to calculate the percentage of calories from fat: Percentage of calories from fat = Calories from fat ÷ Total calories Create an application that allows the user to enter: • The total number of calories for a food item • The number of fat grams in that food item The application should calculate and display: • The number of calories from fat • The percentage of calories that come from fat Also, the application’s form should have a CheckBox that the user can check if he or she wants to know whether the food is considered low fat. (If the calories from fat are less than 30% of the total calories of the food, the food is considered low fat.) Use the following test data…