Write a program that prompts the user to enter the number of study hours of a student and the average of the student. Then the program is checking the following: - If the average of the student is greater than 4 and the number of hours is less than 26, then the program should display "You have a chance"
Q: rite a program that uses switch statement to enter the grades A, B, C, D or F. Your program should…
A: Given: Write a program that uses switch statement to enter the grades A, B, C, D or F. Your program…
Q: Write a program that first asks the user whether they drink coffee or tea and then how many cups a…
A: Given:
Q: Write a program which prompts the user for their age. If they are 19 or younger inform them that…
A: Answer to the above question is in step2.
Q: Write a program that prompts the user to enter the ticket price and the number of people. Then, the…
A: The ticketPrice and numberOfPeople are the inputs and totalPrice and discountPercetage will be the…
Q: In Python, Create a program that prompts the user to pick their lucky #. If the number is greater…
A: #python program that prompts the user to pick their lucky #. If the number is greater than 7, then…
Q: Write a program that asks user to enter a number until user enters -1. Then the program should…
A: Since you have not mentioned programming language I'm doing this in c++.
Q: Write a program that inputs year and month number, it then display the number of days in that month…
A: The given problem is to be solved in programming language where the user will input the year and…
Q: 1. Write a program that prompts the user to enter an integer between 0 and 6 and prints thie day…
A: I give both codes in C along with output and code screenshots.
Q: In [ ]: # write a program to accept a number from the user, # print "Play basketballL" if the number…
A: PROGRAM CODE: n = int(input("Enter the number: ")) // take number from the userif n<=15:…
Q: 1. Write a program that does the following: Ask the user to enter the price of their items. The user…
A: Actually, program is a executable software that runs on a computer.
Q: Write a program that asks the user for their name and their height in inches ("Enter your name: ",…
A:
Q: write a program that enters the test score and display excellent, very good, good, fair. poor, or…
A: I give the code in Python along with output and code screenshot
Q: The cost of renting a room at a hotel is, say $100.00 per night. For special occasions, such as a…
A: code: //Room rent #include<iostream> using namespace std; int main() { double cost, tax_amt,…
Q: Write a program that asks the user to enter the material they wish to purchase (wood, brick, or…
A: def wood(n): costSingle = 0 shippingCharge = 0 if(n>=1 and n<100): costSingle…
Q: Write a program that prompt the user to enter 2 items, if the user purchases bread and butter he…
A: Solution: Java program: import java.util.*; public class Test { // Main method public…
Q: A. Write a program that asks the user to enter a number of seconds. • There are 86400 seconds in a…
A: While doing programming in any programming language, you need to use various variables to store…
Q: Write a program that computes the cost of painting and installing carpet in a room. Assume that the…
A: In this question, we will create a class ROOM to store the properties of the room and to calculate…
Q: Write a program that calculates the cost of 3 bags of fruit. The 4 possible fruits are pears which…
A: A loop is used to execute a block of code several times. The number of iterations is based on a…
Q: The screen size of a TV is given by the length of the rectangular diagonal. Traditional TVs come in…
A: code: #include<iostream> using namespace std; int main() { double…
Q: Write a program that asks the user to enter the three sides (a, b and c) of a triangle as double…
A: Answer the above question are as follows:
Q: Write a program that asks the user for a number in the range of 1 through 7. The program should…
A: def main(): # Get the number for the day of the week. day = int(input('Enter a number (1-7)…
Q: Write a program that prompts the user to enter the name of a football team and its foundation year.…
A: The programming languages include Java, c, c++. The program reads the input from the user that is…
Q: Suppose Dave drops a watermelon off a high bridge and lets it fall until it hits the water. If we…
A: Given, d=0.5×g×t2 g=9.8 meters/second2 Program description: t is the user input integer variable…
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 reads from the user the initial Kilometers of the car, the current Kilometers…
A: Java program for the above fuel consumption problem is given below in step 2.
Q: Write a program that specifies whether a given number (x) falls in one of the following categories…
A: Description: Note: Since you have not provided the language to write the code so I am using java…
Q: Write a program that will ask the user to enter salary amount. And then compute for the TAX amount.…
A: As the language is not specified answer written in c++ 1)Read input 2)Using if else check…
Q: Write a program that asks for the number of calories and fat grams in a food. The program should…
A: Hello Student. Warm welcome from my side. Hope you are doing great. Here's your answer. Since you…
Q: Write a program that asks user to enter a number. Then the program should print the sum of all…
A: Given: Write a program that asks user to enter a number. Then the program should print the sum of…
Q: Write a program which takes fuel type from user. If fuel type in not in the range of 1 to 3 then it…
A: Note: The given Program is in C++ programming language
Q: Write a program that allows the user to input their weight in, height in feet, age in years, and…
A: Body mass index is a person's weight in kilograms divided by the square of height in meters.
Q: How do i solve this problem in python? ( has 3 steps)
A: NOTE:The given information is incomplete (Formula to calculate the minutes to walk or run for a…
Q: Write a program that asks the user for a number in the range of 1 through 7. The program should…
A: In c language: #include <stdio.h> int main() { int n; printf("enter any number between 1…
Q: Write a program using else if to input the number of students(stu) and number of teachers(tea) in…
A: C used to answer this question
Q: BMI Calculation
A: Program: // C++ Version 14#include <iostream>#include <cmath>using namespace std;//…
Q: Write a program that inputs three different integers from the keyboard, then prints the sum, the…
A: here is your code
Q: Write a program that asks the user to type a vowel from the keyboard. If the character entered is a…
A: Actually, program is a executable software that runs on a computer.
Q: Write a program that prompts the user to enter the number of study hours of a student and the…
A: Algorithm Start Var h, n Accept n from user Accept h from user If(n>=4 and h<26), go to step…
Q: In an eye-glass shop, a customer can buy either a pair of single prescription glasses (or a pair of…
A: Code: import java.util.*;public class MyClass { public static void main(String args[]) {…
Q: Write a program that asks user to enter two numbers. Then the program should print the even numbers…
A: Task : Write a program to print even numbers between two numbers. C++ program :- #include…
Q: Write a program that asks for the number of calories and fat grams in a food. The program should…
A: Write a program that asks for the number of calories and fat grams in a food. The program should…
Q: Write a program that computes how much a customer has to pay after purchasing two items. Make the…
A: Step 1 : Start Step 2 : Take user input for the price of Item 1 and item 2. Step 3 : Calculate the…
Q: Create a program and inside your program, type the code as given below. Then rewrite the nested ifs…
A: Hey, since there are multiple questions posted, we will answer first question. If you want any…
Q: Write a program that reads from the user the initial Kilometers of the car, the current Kilometers…
A: Required: Write a program that reads from the user the initial Kilometers of the car, the current…
Q: In an eye-glass shop, a customer can buy either a pair Ol Sngle prescription sunglasses. On each…
A: Since no programming language was mentioned in the question, I have solved in C language.
Q: Given an airplane's acceleration and take-off speed v, you can compute the minimum runway length…
A: The given problem can be solved using simple arithmetic operations in any programming language.…
Q: Write a program that reads the temperature and unit from the user and prints a message indicating if…
A: In C Programming, When an if else statement is present inside the body of another “if” or “else”…
Q: A contractor orders, say, 30 cubic yards of premixed concrete to construct a patio that is to be,…
A: Given The answer is given below.
Q: Write a program that first asks the user whether they drink coffee or tea and then how many cups a…
A: C used to answer this question
Write a
- If the average of the student is greater than 4 and the number of hours is less than 26, then the program should display "You have a chance".
- Otherwise, the program should display "You do not have a chance".
Step by step
Solved in 4 steps with 2 images
- 4. During each summer, John and Jessica grow vegetables in their backyard and buy seeds and fertilizer from a local nursery. The nursery carries different types of vegetable fertilizers in various bag sizes. When buying a particular fertilizer, they want to know the price of the fertilizer per pound and the cost of fertilizing per square foot. The following program prompts the user to enter the size of the fertilizer bag, in pounds, the cost of the bag, and the area, in square feet, that can be covered by the bag. The program should output the desired result. However, the program contains logic errors. Find and correct the logic errors so that the program works properly. // Logic errors. #include #include using namespace std; int main() { double costs double area; double bagsize; cout > bagsize; cout > cost; cout > area; cout << endl; cout << "The cost of the fertilizer per pound is: $" << bagsize / cost << endl; cout << "The cost of fertilizing per square foot is: $" << area / cost << endl; return 0; }Computer Fundamentals and Programming 2 Write a program that determines a student’s grade. The program will accept 3 scores and computes the average score. Determine the grade based on the following rules: - If the average score is equal or greater than 90, the grade is A. - If the average score is greater than or equal to 70 and less than 90, the grade is B. - If the average score is greater than or equal to 50 and less than 70, the grade is C. - If the average score is less than 50, the grade is F. Source Codes and Print Screen of the OutputProblem: Feed Nibble Monster Till Full Write a program that generates a number in [0, 500] at the beginning -- this corresponds to how hungry the monster is -- and keeps asking the user to feed the monster until that number falls to zero. Each time the user feeds the monster a nibble, hunger decreases by the decimal value of the character (i.e. if the user feeds 'A' hunger decreases by 65). But when the user feeds the monster some character that isn't a nibble, the hunger increases by the decimal value of the character (since puking depletes energy). Use while loop. Sample runs: Notice the loop exits after one iteration, because hunger was very low and one nibble made the monster full: Notice hunger increasing after non-nibble (pink highlight): Notice that the program just keeps going when the user feeds the monster only non-nibbles. Do you think the program will keep running forever if the user never gives the monster nibbles?
- Coin Converter Lab Description Write a program that asks the user to enter an amount of money in the format of dollars and remaining cents. The program should calculate and print the minimum number of coins (quarters, dimes, nickels and pennies) that are equivalent to the given amount.Hint: In order to find the minimum number of coins, first find the maximum number of quarters that fit in the given amount of money, then find the maximum number of dimes that fit in the remaining amount, and so on. File Name coins.py Score There are five tests each worth 2 points For example, an execution should look like this:Please enter the amount of money to convert:# of dollars: 2# of cents: 37The coins are 9 quarters, 1 dimes, 0 nickels and 2 pennies python labsPersonal BestWrite a program that asks for the name of a pole vaulter and the dates and vaultheights (in meters) of the athlete’s three best vaults. It should then report, in order ofheight (best first), the date on which each vault was made and its height.Input Validation: Only accept values between 2.0 and 5.0 for the heights.Guess The Number Game: write a program that will ask the user to guess a secret numberrandomly generated by your program between 1-10. Player have 3 trials to guess the number.After each trial, you have to inform the user, either he/she has guessed it correctly or not, andthe remaining trials to guess the number. In each trial your program should generate a newrandom number. If user guess at least twice correctly, then shows the message, “you won by 2-1” and vice versa for losing.When game is over, ask the user to play again: If the user types "yes", the game start again.else stop the game.
- Singular to Plural. Create a program that accepts a word in singular, and produces the corresponding plural. Use the following rules: a. If the word end in ‑s, -ss, -sh, -ch, -x, or –z, then add –es to the word. For example, the plural of tax is taxes b. If the word ends in -fe, then replace the ending with –ves. For example, the plural of wolf is wolves c. If the word ends in y and the previous letter is a vowel, then add –s to the word. For example, the plural of boy is boys d. If the word ends in y and the previous letter is a consonant, then change the –y ending with –ies. For example, the plural of city is cities e. If the word does not meet the criteria above, then add –s to it.(DEBUG AND MAKE A FLOWCHART OF THIS PROGRAM) // This pseudocode is intended to display// employee net pay values. All employees have a standard// $45 deduction from their checks.// If an employee does not earn enough to cover the deduction,// an error message is displayed.// This example is modularized.start Declarations string name string EOFNAME = ZZZZ while name not equal to EOFNAME housekeeping() endwhile while name not equal to EOFNAME mainLoop() endwhile while name not equal to EOFNAME finish() endwhilestop housekeeping() output "Enter first name or ", EOFNAME, " to quit "return mainLoop() Declarations num hours num rate num DEDUCTION = 45 num net output "Enter hours worked for ", name input hours output "Enter hourly rate for ", name input rate gross = hours * rate net = gross - DEDUCTION if net > 0 then output "Net pay for ", name, " is ", net else output "Deductions not covered. Net is…Time CalculatorWrite a program that asks the user to enter a number of seconds.-There are 60 seconds in a minute. If the number of seconds entered by the user is greater than or equal to 60, the program should display the number of minutes and leftover seconds in that many seconds.-There are 3,600 seconds in an hour. If the number of seconds entered by the user is greater than or equal to 3,600, the program should display the number of hours, minutes, and leftover seconds in that many seconds.-There are 86,400 seconds in a day. If the number of seconds entered by the user is greater than or equal to 86,400, the program should display the number of days, hours, minutes, and leftover seconds in that many seconds.
- Nice Number Programming: Nice program ask user to enter three integers from keyboard (java console), the three integers represent left bound, right bound and arbitrary digit 'm', where left bound is less than right bound. Program should print all nice numbers in the given range that doesn't contain digit 'm'. The number is nice if its every digit is larger than the sum of digits which are on the right side of that digit. For example 741 is a nice number since 4> 1, and 7> 4+1. with digit m=2. Write a complete program in Java that Call only One method (niceNumbers method) that will print all nice numbers excluding a given digit 'm' that also entered by user?An Auto Insurance Program Example - Write a program to determine the cost of an automobile insurance premium, based on driver's age and the number of accidents that the driver has had. The basic insurance charge is 500 Rs. There is a surcharge of 100 Rs if the driver is under 25 and there is an additional surcharge for accidents as can be seen below: No. of accidents Accident Surcharge 1 50 2 125 3 250 4 375 5 575 6 or more No insurance Note: Use switch cases when you check the total number of accidents.Number guessing Game Write a C program that implements the “guess my number” game. The computer chooses a random number using the following random generator function srand(time(NULL)); int r = rand() % 100 + 1; that creates a random number between 1 and 100 and puts it in the variable r. (Note that you have to include <time.h>) Then it asks the user to make a guess. Each time the user makes a guess, the program tells the user if the entered number is larger or smaller than its number. The user then keeps guessing till he/she finds the number. If the user doesn’t find the number after 10 guesses, a proper game over message will be shown and the actual guess is revealed. If the user makes a correct guess in its allowed 10 guesses, then a proper message will be shown and the number of guesses the user made to get the correct answer is also printed. After each correct guess or game over, the user decides to play again or quit and based on the user choice, the computer will make…