• Write a program that computes the average of 5 students grades which are entered by the user.
Q: Write a program that reads in three integers and then determines and prints the largest and the…
A: Program approach:- Using the necessary header file. Display 3 inputs with the largest input…
Q: You can find out how many seconds have elapsed since Jan 1, 1970 using the time() function.…
A:
Q: Q3: The volume of a circular cylinder V=rtr?h, write a program to compute the volume if r=8m and…
A: Objective: This program designs a class to create cylinders for a given height and radius. The…
Q: Body Mass Index (BMI) is a measure ofhealth on weight. It can be calculated by taking your weight in…
A: Program code: //import the required packages import java.util.Scanner; //define a class BMI public…
Q: A mobile phone service has three different data plans for its customers: PLAN A: For $19.99…
A: Note: - Since the programming language is not mentioned to write the program. The below code is…
Q: // Currently, this program displays data for all students. Modify it to display only those who have…
A: To display the data for the students who have more than 60 credits and have a GPA of at least 3.5,…
Q: Write a program that reads two pieces of information: the hourly wages and the number of hours…
A: Required: Write a python program to calculate the net salary based on given instructions. all the…
Q: In your favorite open world adventure video game, currency conversion is as given below: 1 Gold…
A: Answer: Code in C++: #include <iostream> using namespace std; int main() { int…
Q: Create using python. Program Specifications: Computer should generate 4 random numbers from 1 - 9…
A: EXPLANATION - 1.import random module 2.define empty list named secret_code 3.generate 4 random…
Q: 3. Write a program that picks a random number between 1 and 100 inclusive. It then prompts the user…
A: I have provided PYTHON CODE along with CODE SCREENSHOT and OUTPUT…
Q: Write a program that reads from a student his/her name and his/her ID which is formed of 8 digits.…
A: The solution to the given problem is below. **Note: As programing language is not mentioned in the…
Q: create a program that swaps 2 numbers value.
A: Note: C programming language is used below to write the program Algorithm: Algorithm to swap 2…
Q: Use Visual Basic Write a RainFall program that stores the total rainfall for each of 12 months into…
A: import java.util.Scanner;class rainFall { public static void main(String[] args) { Scanner keyboard…
Q: A game calculates the average game scores for their players in three attempts. The score in the game…
A: here have to use void function with parameter. i have use attempt as parameter.
Q: Problem: Today you are to write a Java program that will prompt for and read 1 word of a length…
A: Transcribed image text: Problem: Today you are to write a Java program that will prompt for and read…
Q: Write a program that can calculate the class average for a number of students. The user should be…
A: Code: grades = [] while True: grade = int(input('\nEnter grade, -1 to end: ')) if (grade == -1 ):…
Q: You need to write a program that analyses the savings of a child who wants to buy a bike. Your…
A: No Programming language is mentioned in question so I am using java as coding language. JAVA Code:…
Q: Please code in python Write code that translates a name into (simplified) Pig Latin. (Please do…
A: Please find the answer to your question in step 2. The code can handle 3 name parts separated by…
Q: Write a program that asks the user to input a positive integer with at least three digits, and then…
A: Since no programming language is mentioned, I am using c++. Algorithm: Start Read a number n…
Q: Create class name whileloopActivity and write a program to produce the following output using nested…
A: solution:
Q: Write a program that reads the employe name and base salary and then calculat
A: #include <iostream>using namespace std; int main(){ int base_salary; string name; // input…
Q: In C, Given an int variable n that has already been declared, write some code that repeatedly reads…
A: //include the required header file #include <stdio.h> //define main function int main() {…
Q: Write a Java program to calculate the following function: sin (2x² + 1) where r = cos(x² – 2) + 1 x…
A: The given mathematical formula is as follows r=sin2x2+1cosx2-2+1 where x=1 The equivalent java…
Q: 0-6. Addition: One common problem when prompting for numerical input occurs when people provide text…
A: Solution1- Accorrding to first problm , we have created a python code using try function . In given…
Q: Write a program that asks the user to type 10 integers. The program must compute how many even and…
A: Program Explanation: Declare the header files Define the main function Declare an array to store 10…
Q: Write a program that reads from the user the initial KiloMeters of the car, the current KiloMeters,…
A: Note: as programming language is not mentioned c++ is used. The program with output is given below
Q: In Python A soup company is interested in finding out how much of their soup will go into various…
A: def soup_volume(d, h): r = d / 2 volume = math.pi * pow(r, 2) * h volume = 0.95 * volume…
Q: Write a program that reads an unspecified number of scores (1 - 99) and displays the following…
A: NOTE: Programming language is not mentioned, so doing in C++ In this question, we are asked to write…
Q: 1- Write a program that read N of number. Check if number 3 is existing in the numbers read?
A: I give the code in Python along with the output and code screenshot
Q: def matrix_ops (data): data.append([1]) for i in range (99999999999): data = data[::-1]…
A: The solution is given below with output screenshot Happy to help you ?
Q: Statistics are often calculated with varying amounts of input data. Write a program that prompts for…
A: 1. Initialize variables `num`, `sum`, `count`, and `max`.2. Prompt the user to enter numbers…
Q: Write a program that computes and displays the charges for a patient’s hospital stay. First, the…
A: Since you haven't mentioned the programming language, we are answering this in C#.
Q: One common problem when prompting for numerical input occurs when people provide text instead of…
A: Code Sample Outputs
Q: Write a program that prompts the user for a number of decimal places between 1 and 10 and returns…
A: #include<iostream> using namespace std; int main(){ int count=0;…
Q: This program should compound interest continuously. It asks the user for the number of times they…
A: Corrections made: Remove the list n and use a single loop instead of two. Use 2**i to get the year…
Q: g., Smith) Number of hours worke
A: import java.util.Scanner;public class Main { public static void main(String[] args) {…
Q: 2. Sum, Avg, Min, Max This is similar to the exercise we did in class but with two changes: (1) Use…
A: C++ used to answer this question:
Q: Write a method named presentValue that performs this calculation. The method should accept the…
A: We know that the amount we get for a principal P after t years is P + PTR/100 So, according to the…
Q: Program 2: Write a program that asks the user for a word or phrase. Check to see if it is a…
A: class PalinExa { public static void main(String args[]) { int r,sum=0,temp; int n=454;…
Q: Develop a Java Program for Siyagijima Gym using NetBeans. The program must initially output a…
A: Step-1: StartStep-2: Declare a variable n and take input from userStep-3: Declare an array ar of…
Q: The following is list of 22 exam scores. Write program that calculate average of this scores and…
A: Here in the code, the first step is for Storing 22 scores in A The second step is written to…
Q: 4. Create a flowchart of an algorithm that reads in an array of ascending numbers starting from 1…
A: here n=10 for first 10 prime numbers
Q: e a python program to display the greater number between 2 numbers. The numbers are given by user.…
A: Below the python program to display the greater number between 2 numbers. The numbers are given by…
Q: Write a program that plays a simple dice game between the computer and the user. When the program…
A: Actually, program is a executable software that runs on a computer.
![السبت ۲ أكتوبر
المحاولة رقم 1 :2 HW
• Write a program that computes the average of 5 students
grades which are entered by the user.
Write a program that converts pounds into kilograms.
The program prompts the user to enter a number in
pounds, converts it to kilograms, and displays the result.
One pound is 0.454 kilograms.
محتوى إضافي؟
يمكنك إضافة نص وملفات تدعم إجاباتك.
إضافة محتوی
إرسال
الحفظ لوقت لاحق](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fa5350205-5fc6-4bca-bd54-3e7344e0d6bd%2Fb4501cd3-97d7-419f-ab6d-7d08de3bdb6e%2F2nro2uj_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 3 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
- Accumulating Totals in a Loop Summary In this lab, you add a loop and the statements that make up the loop body to a Java program that is provided. When completed, the program should calculate two totals: the number of left-handed people and the number of right-handed people in your class. Your loop should execute until the user enters the character X instead of L for left-handed or R for right-handed. The inputs for this program are as follows: R, R, R, L, L, L, R, L, R, R, L, X Variables have been declared for you, and the input and output statements have been written. Instructions Ensure the file named LeftOrRight.java is open. Write a loop and a loop body that allows you to calculate a total of left-handed and right-handed people in your class. Execute the program by clicking Run and using the data listed above and verify that the output is correct.Problem 7: Guess the price of the car!? You will implement a variant of the number guessing game we played in lecture. In this variant, you will ask the user to guess the price of a $42,500 car. Let's assume that the player knows the price of the car is rounded to the nearest $500. If a player's guess is not exactly correct, your program will tell them they are either too high or too low. The player will get as many guesses as they need to guess the price of the $42,500 car. However they will only win the game if they used 5 or fewer guesses. Here are two examples of how the program should work for both cases: Guess the price and win the prize! Enter your guess:50000 Too high! Enter your guess:40000 Too low! Enter your guess:45000 Too high! Enter your guess:42500 You won the car! Guess the price and win the prize! Enter your guess:46000 Too high! Enter your guess:45000 Too high! Enter your guess:44000 Too high! Enter your guess:43000 Too high! Enter your guess:42000 Too low! Enter your…Summary In this lab, you complete a prewritten Python program for a carpenter who creates personalized house signs. The program is supposed to compute the price of any sign a customer orders, based on the following facts: The charge for all signs is a minimum of $35.00. The first five letters or numbers are included in the minimum charge; there is a $4 charge for each additional character. If the sign is make of oak, add $20.00. No charge is added for pine. Black or white characters are included in the minimum charge; there is an additional $15 charge for gold-leaf lettering. Instructions Make sure the file HouseSign.py is selected and open. You need to assign variables for the following: A variable for the cost of the sign assigned to 0.00 (charge). A variable for the number of characters assigned to 8 (numChars). A variable for the color of the characters assigned to "gold" (color). A variable for the wood type assigned to "oak" (woodType). Write the rest of the program using…
- Write a program that reads 6 integers and displays the largest and the smallest amongst those integers.3) Suppose an airline company has hired you to write a program for choosing the passengers who should leave an overbooked flight. That means the airline has booked too many passengers hoping some of them would not show up on time, but passengers are on board and the aircraft doesn't have enough seats available for all these passengers. Your program chooses the passenger who must leave the flight. Passengers will be ranked based on the fare they have paid for booking (a double number called fare), and their number of loyalty points (an integer number called points). Fare and points are equally important, that means, in order to decide the position of each passenger in the list, fare and points each have 50% importance. A Person with minimum priority (combination of fare and points) will leave the flight. You need to define a class called Passenger with these member variables: passenger's name • fare points. Passenger class must have 3 accessors, 3 mutators, a constructor with three…You have been hired by a local organic sod company to write coverage calculator for their website. Organic sod is cut into rectangles 9 square foot in area for lawn installation. Your program will prompt the customer for the length and the width of a rectangular area being covered with sod. Implement the following "pseudocode" to obtain the number of pieces to order. • Compute the area of the rectangle to be covered • Divide the area by 9 • Convert the result to an integer and then add 1 Below is a sample run with Python output in blue and user input in black. Enter length:200 Enter width:40 You should order 889 pieces.
- Design and implement an application that plays the Hi-Lo guessing game with numbers. The program should pick a random number between 1 and 100 (inclusive) and then repeatedly prompt the user to guess the number. On each guess, report to the user that he or she is correct or that the guess is high or low. Continue accepting guesses until the user guesses correctly or chooses to quit. Use a sentinel value to determine whether the user wants to quit. Count the number of guesses, and report that value when the user guesses correctly. At the end of each game (by quitting or a correct guess), prompt to determine whether the user wants to play again. Continue playing games until the user chooses to stop.Write code that iterates while userNum is less than 12. Each iteration: Put userNum to output. Then, put "/" to output. Then, assign userNum with userNum multiplied by 3.Transient PopulationPopulations are affected by the birth and death rate, as well as the number of people who move in and out each year. The birth rate is the percentage increase of the population due to births and the death rate is the percentage decrease of the population due to deaths. Write a program that displays the size of a population for any number of years. The program should ask for the following data: The starting size of a population P The annual birth rate (as a percentage of the population expressed as a fraction in decimal form)B The annual death rate (as a percentage of the population expressed as a fraction in decimal form)D The average annual number of people who have arrived A The average annual number of people who have moved away M The number of years to display nYears Write a function that calculates the size of the population after a year. To calculate the new population after one year, this function should use the formulaN = P + BP - DP + A - Mwhere N is the…
- 1. Write a program that compares the values of y1 and y2 in the following expressions for values of n up to 100 in increments of 10. Does the result surprise you?Write a program that reads from the user a character (*q' or 'c'). If the character is 'c', the program reads from the user the radius r of a circle and prints its area. If the user enters 'q', the program asks the user to enter the length and width of a quadrilateral. We assume the quadrilateral is either a square or rectangle. You should print if the quadrilateral is square or rectangle. Otherwise, it prints "Wrong character" PS: Use the following formulas : area of circle=3.14*r? I
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)