Write a program that asks the user his/her name(first letter), semester, mlarks, and age and then prints to the screen in the following manner. Initial of your name is: R You are in Semester: Your marks percentage is: 76.4% You are 22 years old.
Q: Write a program that takes the user age and prints the following: Print too old, if age is greater…
A: Use if else if statements to check all the conditions one by one
Q: write a program that displays, in ascending order,the first names of those students who have…
A: Step 1:- In the question does not show in which language write the program therefor above program…
Q: Write a program that reads from the user two integers of three digits each. The program finds the…
A: import java.util.*;public class Main{ // to display the digits of number separated by space public…
Q: Write a program that asks users when their birthday is. Use information provided to give them their…
A: Program Approach - Use the header files as per the requirement for the code. Define the main…
Q: Write a program that calculates the potential energy of 3 charges q1 = 1, q2 = 2, q3 = 3 located at…
A: C program: #include <stdio.h>#include<math.h> // function to print distancefloat…
Q: Write a program to convert centigrade to Kelvin. It should display value in centigrade and then the…
A: Python program to solve the given problem is below.
Q: Write a program that asks the user for a word, then prints out the word once on the first line,…
A: Algorithm: Input word from user Append a space to the input word Iterate a for loop for variable i…
Q: Python Write a program that receives a number from a user and checks if it's float or integer. In…
A: a=float(a)if int(a)/a==1: if a%2 == 0: print("This is Integer and Even Number") else:…
Q: Write a program that accepts a number entered by the user and validates if it is odd oreven. If it…
A: Sample Response: #python3 program#accept a numbernum = int(input("Enter a number: "))#validate the…
Q: Write a program that reads a bank aCcount balance and an interest rate and displays the value of the…
A:
Q: Write a program that takes user input describing a playing card in the following shorthand…
A: Hello Student. Greetings Hope you are doing great. As you have not specified any particular language…
Q: Write a program that reads from the user two integers of three digits each. The program finds the…
A: import java.util.Scanner;//to readinputpublic class Main{ public static void main(String[] args) {…
Q: write a program in VB that requires from user to insert the total number of students and the number…
A: ' Program that reads total student and successful student and calculate' and display percentage of…
Q: Write a program that asks the user to type the coordinate of 2 points, A and B (in a plane), and…
A: Note :-You have not mention the language of the program, so i'm answering your question in C++. Your…
Q: Write a program that prompts the user to enter the minutes (e.g., 1 billion), and displays the…
A: NOTE: SINCE THE LANGUAGE OF THE CODE IS NOT MENTIONED, I HAVE USED JAVA FOR THE SOLUTION. Define…
Q: Write a program that prompts the user to enter the students’ names and their scores on one line, and…
A: Output:
Q: Write a program that prompts the user to enter theminutes (e.g., 1 billion), and displays the number…
A: Program code: //IMPORT Scanner class import java.util.Scanner; //define a class NoOfYears public…
Q: Write a program that can be used to calculate the federal tax. The tax is calculated as follows: For…
A: The question is to write a code for the given problem and no language has been mentioned, here C++…
Q: Write a program using if, and elif and else, that asks the user what their favorite food is. Then…
A: According to the information given:- We have to create the program in that we as user to tell his…
Q: Write a program that gets two car information from the user, compares them, and print out the…
A: First, we need to define Car class with the attributes and methods and then define the main function…
Q: Write a program that computes the rent in five years and the total rent for one year starting five…
A: Program description: Assume, b be a user input integer variable that stores the basic salary. r is a…
Q: Write a program that asks the user for his name and salutes him using it. The prompt must be "What…
A: According to the Question below the solution: Output:
Q: Write a program that reads the following information and prints a payroll statement: Employee’s name…
A: Answer:
Q: Write a program that shows the growth of money that occurs in a savings account. Your program should…
A: Program code: #prompt the user to enter initial balance initialBalance=int(input("Enter initial…
Q: Write a program that calculates the amount of money a person would earn over a period of time if his…
A: here in given question ask for python program.
Q: Write a program that reads from the user a number that represents its grade, and then displays a…
A: As no programming language is mentioned, it is solved using basic C++
Q: Write a program with total change amount as an integer input, and output the change using the fewest…
A: See below steps for complete code and output:
Q: Write a program that asks the user the number of hours an employee worked and his hourly wage,…
A: #include <iostream>using namespace std; int main() { int hours=0,wage=0; double…
Q: Write a program that takes in user input to ask the following questions: "What is your favorite…
A: The answer is given below.
Q: Write a program with total change amount as an integer input, and output the change using the fewest…
A: Find the required code in python given as below and output :
Q: Write a program to convert a measurement given in feet to the equivalent number of (a) yards, (b)…
A: Program requirements: The c++ program prompts the user to enter the value for feet and then…
Q: Write a program that checks to see if the user won the lottery. Assume the winning lottery numbers…
A: Since no programming language is mentioned, I am using python. Algorithm: Start Store the given…
Q: Write a program which prompts the user for a number and prints the numbers from 1 up to that number,…
A: ALGORITHM:- 1. Take the value of n as input from user. 2. Generate the numbers from 1 to the input…
Q: Write a program which takes the user's age in years and convert it into months. 1 Year= 12 Months %D
A: Algorithm: Step1: Declare variables, Nofmonths & years to store values. Step2: Receive the user…
Q: Write a program that reads a four-digit number from user, then the program separates digits of the…
A: code
Q: Write a program that prompts the user to enter the three dimensions, possibly with decimals, of a…
A: //Solution in C++ #include<iostream>#include <iomanip>using namespace std;int main(){…
Q: in python: Write a program with total change amount as an integer input, and output the change…
A: In this question, first, we divide the input by 100 to make in dollars, and the remainder of the…
Q: Write a program that interprets the Body Mass Index (BMI) based on a user's weight and height. It…
A: Python code to find BMI of person is given below.
Q: Write a program that receives a number from a user and checks if it's float or integer. In case of…
A: First we declare the number variable, which gets input from the user. Also, we declare a variable…
Q: Write a program that translates a letter grade into a number grade. Letter grades are A, B, C, D,…
A: Write a program that translates a letter grade into a number grade. Letter grades are A, B, C, D,…
Q: Write a program that plays a guessing game with the user. The program should generate a random…
A: Required code for the Java program is given in the next step using a while loop for continuous…
Q: Write a program that plays a guessing game with the user. Have your program read and store an…
A: Input a number and then generate a random number The number should be from 1 to 10 So, applying %10…
Q: Write a program that prompts the user to input two POSITIVE numbers — a dividend (numerator) and a…
A: #include <stdio.h>//The code execution begins from the start of the main() function.int main()…
Q: Write a program that prompts the user for a U.S. dollar amount and then converts it to Japanese Yen,…
A: Purpose: In this the dollar has to be converted into yen, Pound, Currency and then it has to…
Q: Write a program to read in a collection of 5 exam scores ranging from 1 to 100. Your program should…
A: Program plan: Create an array and declare the respective variables Prompt for the 5 numbers from…
Q: Write a program that can be used to calculate the federal tax. The tax is calculated as follows: For…
A: PROGRAM: //header files #include <iostream> #include<iomanip> //using namespace using…
Q: Write a program that asks the user to enter 2 integers of 4 digits and displays the different digits…
A: Use an array to store individual digits of each number and then compare these two arrays bit by bit…
Q: Write a program that prompts the user to enter the distance todrive, the fuel efficiency of the car…
A: Program Plan: importing the libraries of utility class for scanner and other mathematical…
Q: Write a program that asks the user for a negative number, then prints out the product of all the…
A: Solution: Since any specific language for the above question is not mentioned, we have solved…
Q: Write a program that allows you to play rock,paper, scissors against the computer. When first run…
A: #include <iostream>#include <stdio.h>#include <stdlib.h>#include <ctime>…
Q: Write a program that can be used to calculate the federal tax. The tax is calculated as follows: For…
A: Python Code Standard_Exemption = 4000; Tax_Salary = 0.0 tax = 0.0 child = 0 Marital_Status =…
Q: Write a program that reads a number in feet, converts it to meters, and displays the result. One…
A: PROGRAM CODE: import java.util.Scanner; public class Main { public static void main(String[] args) {…
Q: Write a program that asks users when their birthday is. Use information provided to give them their…
A: Your solution is here with an output.
Q: Write a program that reads the following informa- tion and prints a payroll statement: Employee’s…
A: Lets see the solution.
Q: Write a program that generates a plate number based on the user's answer to the following questions:…
A: PROGRAM EXPLANATION Include the header file. Define the main function. Create variables for input…
Q: Write a program that ask the user to enter his/her letter grade and then respond with an appropriate…
A: grade = input("Enter your grade : ") #taking user inputif(grade == 'a' or grade == 'A'):…
Q: Write a program that takes an age (for example 15) as input and prints something as "You look older…
A: Please find the answer below :
Q: Write a program that calculates the attendance percentage for students, there are total 120 working…
A: Note: In this question the coding language is not specified then we are doing this question in the…
Step by step
Solved in 2 steps
- Exercise I- Medicine Write a program that asks the user to enter the name of the medicine (t for ThroX, f for FeliX), his mass. The user should enter as well if he has a prescription or not. The program will calculate the dosage using: age and his ThroX without prescription -The max dosage should be 0.75 mL -The dosage = mass / 150 -The number of pills per day to take is 1 ThroX with prescription -The dosage =mass * 3 / 150 -The number of pills per day to take is 5 FeliX with prescription -The dosage = 0.77 mL FeliX without prescription -The dosage should be between 0.3 and 0.7 -The dosage = mass * 0.009 -The number of pills per day to take is 2 -The number of pills per day to take is 6 The program should display the dosage and the number of pills to be taken per day if the requirements are full filled, otherwise it display "Please check your doctor for a prescription". In case the medicine does not exist in the database, the program display “Your medicine is not in our database!"…Python Assignment: In India McDonald's has the n number of customers and they are famous for their taste and quality so they plan to Organise the challenge for foody people. What is the challenge is?| you have taken a food challenge from the Chef and now you have to eat directly the Y burgers. You will eat as follows: At the first minute you will eat exactly the X burgers and every minute after that you will eat twice the number of burgers you ate the minute before. As you can get tired of food, Chef also lets you take a break from eating for one minute. When you start eating again after a break, your food streaks are reset, which means that in the first minute after the break you will eat X burgers and every minute after that you will eat the burgers you ate twice the last minute. Allow a1, a2, ., let it be your meal length in minutes. The cook needs to have all the ai different in pairs. Get the minimum number of minutes you need to eat Y burgers directly or decide that it is not…Q1: The local Driver's License Office has asked you to write a program that grades the writ- ten portion of the driver's license exam. The exam has 20 multiple choice questions. Here are the correct answers: 1. A 2. D 3. B 4. B 5. C 6. B 7. A 8. B 9. C 10. D 11. A 12. C 13. D 14. B 15. D 16. C 17. C 18. A 19. D 20. B Your program should store the correct answers shown above in an array. It should ask the user to enter the student's answers for each of the 20 questions, and the answers should be stored in another array. After the student's answers have been entered, the program should display a message indicating whether the student passed or failed the exam. (A student must correctly answer 15 of the 20 questions to pass the exam.) It should then display the total number of correctly answered questions, the total number of incorrectly answered questions, and a list showing the question numbers of the incorrectly answered questions. Input Validation: Only accept the letters A, B, C, or…
- The company discounted used cars pays their employees according to this chart: 250$ per months plus 50$ per car sold. If the salesman sells more than 10 cars, the employee receives a bonus of 5% of the total of his sales, in addition to his regular salary.Each month, the owner sits in front of the computer, and enters the following information: The name of the employee, the number of cars sold, as well as the total of all the sales for the month. algorithm that will calculate the salary of an employee for the month, and then display on the screen, his name, total cars sold, base salary, bonus if applicable and entire salary1. 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.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…
- 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 InfraredBirthday party At Lili's birthday party, there was a game arranged by Jojo as the host. That game is to distribute Y number of candy to X number of people where all the candy tastes sweet except for one last candy which tasted like rotten nuts. Candy distribution will be sequentially starting from position Z and if past the last position then the distribution of candy continues to the first position. Write down the person in which position will get the last candy. Input FormatThe first line of input is T, which is the number of test cases.The second row and the next number of T rows are X, Y, Z.X is the number of people to whom the candy will be distributed.Y is the number of candy available.Z is the starting position of the person to whom the candy will be distributed. Output FormatA string “Case #N: “ and a number representing the position of the person who got the last candy. Constraints1 ≤ T ≤ 1001 ≤ X, Y ≤ 1031 ≤ Z ≤ X Sample Input 43 4 13 5 24 2 24 5 2 Sample OutputCase #1: 1Case…Birthday party At Lili's birthday party, there was a game arranged by Jojo as the host. That game is to distribute Y number of candy to X number of people where all the candy tastes sweet except for one last candy which tasted like rotten nuts. Candy distribution will be sequentially starting from position Z and if past the last position then the distribution of candy continues to the first position. Write down the person in which position will get the last candy. Input FormatThe first line of input is T, which is the number of test cases.The second row and the next number of T rows are X, Y, Z.X is the number of people to whom the candy will be distributed.Y is the number of candy available.Z is the starting position of the person to whom the candy will be distributed. Output FormatA string “Case #N: “ and a number representing the position of the person who got the last candy. Constraints? ≤ ? ≤ ???? ≤ ?, ? ≤ ???? ≤ ? ≤ X Sample Input 43 4 13 5 24 2 24 5 2 Sample OutputCase #1: 1Case…
- 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.Question: Party budget planning - complex Prompt the user to enter their current budget and the number of people who need to share a meal. You are ordering food from a restaurant that has two menu items: Tacos $4 Empanadas $3 Calculate and print out all the options of meals where the budget is used entirely(where possible) and each person has an equal number of items to eat. They may eat different things, but everyone gets the same number of food items, e.g. 2 tacos or 1 empanada and 1 taco or 2 empanadas. Hints: Here are some things that might help you in your solution. If total items purchased does not equally divide by the number of diners, then abandon that combination. It may help to calculate the max number of empanadas that the budget can buy and also the max number of tacos that the budget could buy. These can be thought of as upper bounds in your loops. In your solution, keep track of items per person Also, keep track of total number of viable solutions, as that might…Question: Party budget planning - complex Prompt the user to enter their current budget and the number of people who need to share a meal. You are ordering food from a restaurant that has two menu items: Tacos $4 Empanadas $3 Calculate and print out all the options of meals where the budget is used entirely(where possible) and each person has an equal number of items to eat. They may eat different things, but everyone gets the same number of food items, e.g. 2 tacos or 1 empanada and 1 taco or 2 empanadas. Hints: Here are some things that might help you in your solution. If total items purchased does not equally divide by the number of diners, then abandon that combination. It may help to calculate the max number of empanadas that the budget can buy and also the max number of tacos that the budget could buy. These can be thought of as upper bounds in your loops. In your solution, keep track of items per person Also, keep track of total number of viable solutions, as that might…