Question

Create a program that determines ice cream size based on price How much would you like...

Create a program that determines ice cream size based on price

  1. How much would you like to pay for an ice cream? Use the input function to ask this question
  2. If the answer to question 1 is less than 2, print "Small ice cream"
  3. If the answer to question 1 is less than 4 and greater than 2, print "Medium ice cream"
  4. If the answer to question 1 is greater than or equal 4, print "Large ice cream"

Homework Answers

Answer #1
n=int(input("How much would you like to pay for an ice cream?"))
if(n<2):
        print("Small ice cream")
elif(n<4):
        print("Medium ice cream")
else:
        print("Large ice cream")

NOTE : PLEASE COMMENT BELOW IF YOU HAVE CONCERNS.

I AM HERE TO HELP YOUIF YOU LIKE MY ANSWER PLEASE RATE AND HELP ME IT IS VERY IMP FOR ME

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Researchers investigate how the size of a bowl affects how much ice-cream people tend to scoop...
Researchers investigate how the size of a bowl affects how much ice-cream people tend to scoop when serving themselves. People were randomly given a 17-oz bowl or a 34-oz bowl. They were then invited to scoop as much ice cream as they liked. Here are the summaries: Small Bowl: n=26, y=5.07 oz, s=1.87 oz Big Bowl: n=22, y=6.58 oz, s=2.91 oz Calculate the 90% confidence interval for the difference in portion size between the big and small bowl. Put the...
1)Write a program that asks a user for a number. If (and only if) the number...
1)Write a program that asks a user for a number. If (and only if) the number is greater than zero print “The number is valid” 2)Write a program that asks a user for a grade. If (and only if) the grade is greater than zero and less than 101, print “The grade is valid” 3)Write a program that asks a user how many widgets they want to buy and prints out what the user should pay. Widgets costs 10 dollars....
Coffee Order Structure Assignment Write a program that uses a structure for a coffee order. A...
Coffee Order Structure Assignment Write a program that uses a structure for a coffee order. A coffee order consists of a double price, a string for flavor, and characters for cream (Y/N), sugar (Y/N), and coffee size (S/M/L). Your main() function will call an order function that will ask the user for the flavor, size and whether or not they want cream or sugar. Your main() function will then create a coffee order structure and assign all of the values...
Questions: 1. (5 marks) Create a VB.NET Console Application that defines a function Smallest and calls...
Questions: 1. Create a VB.NET Console Application that defines a function Smallest and calls this function from the main program. The function Smallest takes three parameters, all of the Integer data type, and returns the value of the smallest among the three parameters. The main program should (1) Prompt a message (using Console.WriteLine) to ask the user to input three integers. (2) Call the built-in function Console.ReadLine() three times to get the user’s input. (3) Convert the user’s input from...
5) Write a java program with scanner object to input first number and second number as...
5) Write a java program with scanner object to input first number and second number as variable with input statement and system out print statement. Steps: 1) Declare scanner object 2) Ask system out print for first number and declare variable first number 3) Ask system out print for second number and declare variable second number 4) Declare first for loop where variable int i has already a value (your choice), that i is less then equal to ? and...
Mr. Consumer allows himself to spend $100 per month on cigarettes and ice cream. Mr. C’s...
Mr. Consumer allows himself to spend $100 per month on cigarettes and ice cream. Mr. C’s preferences for cigarettes and ice cream are unaffected by the season of the year. (1) In January, the price of cigarettes was $1 per pack, while ice cream cost $2 per pint. Faced with these prices, Mr. C bought 30 pints of ice cream and 40 packs of cigarettes. Draw Mr. C’s January budget line and label his January consumption bundle with the letter...
Create a program named admission that takes as Input the student name, GPA and the admission...
Create a program named admission that takes as Input the student name, GPA and the admission Test Score, the application should display if the student got accepted or rejected. The program should use a function named AcceptOrReject( gpa, testScore) to control the program. Acceptance is based on the following criteria: The student can get accepted in the following two cases : 1- if the GPA is less than 3.0, the test score has to be more than 80 to get...
Use C++ Write a program that first reads in how many whole numbers the user wants...
Use C++ Write a program that first reads in how many whole numbers the user wants to sum, then reads in that many whole numbers, and finally outputs the sum of all the numbers greater than zero, the sum of all the numbers less than zero (which will be a negative number or zero), and the sum of all the numbers, whether positive, negative, or zero. The user enters the numbers just once each and the user can enter them...
(Use C++ language) Create a program, named threeTypesLoops.cpp, that does the following; 1. Uses a For...
(Use C++ language) Create a program, named threeTypesLoops.cpp, that does the following; 1. Uses a For Loop that asks for a number between 1 and 10; Will double the number each time through the loop and display the answer. Will run five times, so the number will have been doubled five times, and the answer displayed five times. After the loop, display a message saying 'It's done!'. 2. Uses a While Loop; Ask the user to input a friend's name....
Dr. Addison believes that going through a training program will increase weekly reading. College students read...
Dr. Addison believes that going through a training program will increase weekly reading. College students read a mean of 2.3 days a week with a variance of 4.00 days. Dr. Addison's sample of 30 students read a mean of 3.2 days a week. What can be concluded with an α of 0.05? c) Obtain/compute the appropriate values to make a decision about H0. (Hint: Make sure to write down the null and alternative hypotheses to help solve the problem.) critical...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT