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
Ice Cream Program Assignment Write a program in c# that uses a function to ask the...
Ice Cream Program Assignment Write a program in c# that uses a function to ask the user to choose an ice cream flavor from a menu (see output below.) You must validate the users input for the flavor of ice cream accounting for both upper and lower-case letters. You must give them an appropriate error message and allow them to try again.   Once you have a valid flavor, your function will return the flavor back to the main() function.   ...
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...
Please create a c++ program that will ask a high school group that is made of...
Please create a c++ program that will ask a high school group that is made of 5 to 17 students to sell candies for a fund raiser. There are small boxes that sell for $7 and large ones that sell for $13. The cost for each box is $4 (small box) and $6 (large box). Please ask the instructor how many students ended up participating in the sales drive (must be between 5 and 17). The instructor must input each...
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...
4) Write a java program where you will use while loop, where if condition is equal...
4) Write a java program where you will use while loop, where if condition is equal to 2 (or any other choice of your number) then it will break the while condition. Steps: 1) Declare variable int (any name) which is equal to zero 2) Declare while condition which variable int is less then equal to 10 3) Declare print out where the value of variable is the same name that you declared in step 1 4) Declare condition if...
C++ PROGRAM. (C++ INTRO QUESTION) Write a program that prints the count of all prime numbers...
C++ PROGRAM. (C++ INTRO QUESTION) Write a program that prints the count of all prime numbers between A and B (inclusive), where A and B are defined as follows: A = 55000 B = A + 5000 Just a recap on prime numbers: A prime number is any number, greater or equal to 2, that is divisible ONLY by 1 and itself. Here are the first 10 prime numbers: 2, 5, 7, 11, 13, 17, 19, 23, and 29. Rules:...
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...
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...