Question 1 Write an application that displays a menu of five items in a Samzo restaurant as follows: ********Welcome to Samzo Restaurant Menu********** (1) Milk R10.99 (2) Coke R21.00 (3) Chips R22.75 (4) Bread R11.50 (5) Pap & Steak R43.00 ***Enjoy your meal... Thank you*** Prompt the user to choose an item using the number (1, 2, 3, 4 or 5) that corresponds to the items in the menu, or to enter 0 to quit the application. The program should then display the name and price of the selected item.​

Answers

Answer 1

Here's a Python program that displays the Samzo Restaurant menu and prompts the user to make a selection:

The Program

print("********Welcome to Samzo Restaurant Menu**********")

print("(1) Milk R10.99")

print("(2) Coke R21.00")

print("(3) Chips R22.75")

print("(4) Bread R11.50")

print("(5) Pap & Steak R43.00")

while True:

   selection = int(input("Please enter a number (1-5) to select an item, or 0 to quit: "))

   if selection == 0:

       print("Thank you for visiting Samzo Restaurant!")

       break

   elif selection == 1:

       print("You have selected Milk for R10.99")

   elif selection == 2:

       print("You have selected Coke for R21.00")

   elif selection == 3:

       print("You have selected Chips for R22.75")

   elif selection == 4:

       print("You have selected Bread for R11.50")

   elif selection == 5:

       print("You have selected Pap & Steak for R43.00")

   else:

       print("Invalid selection. Please try again.")

This program uses a while loop to repeatedly prompt the user for a selection until they enter 0 to quit. It uses an if statement to determine which menu item was selected based on the number entered by the user, and then displays the name and price of the selected item.

If the user enters an invalid selection (i.e. a number outside of the range 0-5), the program displays an error message and prompts the user to try again.

Read more about Python programs here:

https://brainly.com/question/26497128

#SPJ1


Related Questions

you work at a large department store selling computer products. iwina walks in and wants to buy a wireless router. she explains that the media streaming device she ordered online supports a transmission speed of up to 200 mbps. what type of router should you recommend?

Answers

If Iwina's media streaming device supports a transmission speed of up to 200 Mbps, I would recommend a wireless router that supports at least 802.11n wireless standard.

What is a 802.11n wireless standard?

802.11n is a wireless networking standard that operates on both the 2.4 GHz and 5 GHz frequency bands. It offers higher speeds and greater range compared to earlier wireless standards, and is commonly used in home and small business networks.

Thus, if Iwina's media streaming device supports a transmission speed of up to 200 Mbps, I would recommend a wireless router that supports at least 802.11n wireless standard. This wireless standard supports a theoretical maximum speed of up to 600 Mbps, which should provide enough bandwidth to support Iwina's device. Alternatively, a router that supports the newer 802.11ac wireless standard could also be considered, as it offers even higher theoretical speeds.

Learn more about wireless router on:

https://brainly.com/question/30079964

#SPJ1

Often, programmers list the ____ first because it is the first method used when an object is created.a. instanceb. constructorc. accessor

Answers

Often, programmers list the constructor first because it is the first method used when an object is created.

A constructor is a unique method of the class that is executed when an instance of a class is created. It has the same name as the class and is created as a separate method. The constructor is also used to assign values to variables when the object is created. You can define constructors with or without parameters. The object's properties and variables can be initialized with the help of a constructor. Here's an example of how to create a constructor:

class Car {

String name;

int model_number;

Car(String name, int model_number) {

// The constructorthis.name = name;

this.model_number = model_number;

}

public static void main(String[] args) {

  Car car1 = new Car("BMW", 11);

  Car car2 = new Car("Audi", 2021);

   System.out.println(car1.name + " " + car1.model_number);

   System.out.println(car2.name + " " + car2.model_number);

   }

}

As we have defined a constructor for the Car class and used the Car object to initialize the name and model_number properties.

Learn more about constructor visit:

https://brainly.com/question/13025232

#SPJ11

what is programs that instruct computers to perform specific operations?

Answers

Answer:software, instructions that tell a computer what to do. Software comprises the entire set of programs, procedures, and routines associated with the operation of a computer system. The term was coined to differentiate these instructions from hardware—i.e., the physical components of a computer system.

Explanation:

Which of the following terms is just the collection of networks that can be joined together?A virtual private networkB LANC intranetD extranetE internet

Answers

The term "internet" is just the collection of networks that can be joined together. The correct option is E.

The internet is a vast network of networks. It's a global network of computers, and it's used by millions of people every day. There's no central organization that controls the internet. Instead, it's made up of a vast number of networks that are connected together. This makes it possible for people to communicate with each other no matter where they are in the world.The internet is used for many different purposes. It's a tool for communication, for research, for shopping, for entertainment, and for many other things. It's also an important tool for businesses, governments, and organizations of all kinds. The internet has changed the way we live and work in many ways, and it will continue to do so in the future.There are many different kinds of networks that make up the internet. These include local area networks (LANs), wide area networks (WANs), and metropolitan area networks (MANs). Each of these networks has its own set of protocols and technologies that are used to connect computers together.The internet is also made up of many different kinds of servers and other devices. These include web servers, file servers, routers, switches, and firewalls. Each of these devices has a specific function within the internet, and they all work together to make it possible for people to communicate and share information.Therefore, the correct answer is E.

Learn more about the internet here: https://brainly.com/question/2780939

#SPJ11

Other Questions
por cuanto tiempo ______ tu el autobus? Which of the following answers best indicates the semantic property that the (a) and (b) words shown below share AND the semantic properties that distinguish the (a) and (b) words? (a) woman, nurse, daughter, seamstress (b) cow, duck, doe, sow The (a) and (b) words are (female), the (a) words are [occupation), and the (b) words are [food]. The (a) and (b) words are (female), the (a) words are [human), and the (b) words are [animal]. The (a) and (b) words are [animal], the (a) words are (female) and the (b) words are [neuter]. The (a) and (b) words are [animal], the (a) words are (female), and the (b) words are (farm). the cells that deposit new bone tissue are the ______. Which of the following romantic qualities is best shown in the section of TheTask titled A Landscape Described, Rural Sounds?A. Interest in the Natural WorldB. SupernaturalismC. Liberty and Freedom Which statement about Mahmouds family is best supported by the text? Ayuda, consulte el archivo adjunto a continuacin.Help please, 50 points! View the attachment belowPlease type a text version of the answer to each question how does gene regulation help conserve energy for an organism? Consider the following disease scenarios, and determine the correct mode of transmission for each by dragging the labels to the appropriate description.- Syphillis from unprotected sex- Lyme disease- Salmonellosis from egg salad at a picnic- Chickenpox from one child coughing on another- Hepatitis B from needle sharing- MRSA WILL MARK BRAINLIEST IF ANSWERED CORRECTLY :) Reread Ch 9 from Animal Farm and answer the following question. What injuries has Boxer received?What now happens every week?What did Napoleon discourage the piglets to do?What was to be built for the piglets?What new laws were made to show the pig's superiority?What was held for the pigs only?What new lies about Snowball were made?Who reappeared in the summer? a teacher monitored the number of people texting during class each day and calculated the corresponding probability distribution. what type of probability distribution did the teacher use? guayule (parthenium argentatum) is a plant originating in mexico that is used to produce rubber. scientists used artificial selection to breed guayule with a relative plant from utah, parthenium ligulatum, and produced a hybrid plant that transferred cold tolerance to guayule. in this example, plant growth habits and leaf shape are components of that enabled cold tolerance, and the transferability of these traits is an example of . guayule (parthenium argentatum) is a plant originating in mexico that is used to produce rubber. scientists used artificial selection to breed guayule with a relative plant from utah, parthenium ligulatum, and produced a hybrid plant that transferred cold tolerance to guayule. in this example, plant growth habits and leaf shape are components of that enabled cold tolerance, and the transferability of these traits is an example of . sexual reproduction; variation variation; heritability genetic drift; taxonomy heritability; overproduction of offspring What is the y-intercept of the linewith the equation y = - 4x - 12 Which of the following statements is CORRECT? a. Since the ROA measures the firm's effective utilization of assets without considering how these assets are financed, two firms with the same EBIT must have the same ROAb. Suppose a firm wants to maintain a specific TIE ratio. It knows the amount of its debt, the interest rate on that debt, the applicable tax rate, and its operating costs. With this information, the firm can calculate the amount of sales required to achieve its target Tie ratio, c. Suppose ali firms follow similar financing policies, face similar risks, have equal access to capital, and operate in competitive product and capital markets. However, firms face different operating conditions because, for example, the grocery store industry is different from the airtime industry. Under these conditions, firms with high profit margins will tend to have high asset turnover ratios, and firms with low profit margins will tend to have low turnover ratios. d. Klein Cosmetics has a profit margin of 5.0, a total assets turnover ratio of 15 times, no debt and therefore an equity multiplier of 1.0, and an ROE of 75%. The CFO recommends that the firm borrow funds using long-term debt, use the funds to buy back stock and raise the equity multiplier to 20. The size of the firm cassets) would not change. She thinks that operations would not be affected, but interest on the new debt would lower the profit margin to 4,5%. This would probably not be a good move, as it would decrease the ROE from 7.5% to 6.5% e. Even though Firm A's current ratio exceeds that of Firm B, Firm O's quick ratio might exceed that of A. However, if A's quick ratio exceeds B's, then we can be certain that A's current ratio is also larger than B's Estimat the number and wattage of lamps. which would be required to illuminate a workshop space 60x1.5 meteres by means of lamps mounted 5 metres above the working Plane The average illumination required is about 100 wt. coefficient of utilisation = 0.4 luminous efficiency 16 lumens per watt. Assume a space-height ratio of unity and a cundle Power depreciation of 20% Which expressions are equivalent to 8(3/4y -2)+6(-1/2+4)+1 if a traingle with all sides of equal legnth has a perimeter of 15x 27 , what is an expression for the legnth of one of the sides Assume that the readings at freezing on a batch of thermometers are normally distributed with a mean of 0C and a standard deviation of 1.00C. A single thermometer is randomly selected and tested. Find the probability of obtaining a reading less than 0.35C.Round your answer to 4 decimal places using the chart below, explain which organism is most closely related to the human and why? which is most distantly related and why? true/false. intelligence is relatively independent of education and includes reasoning, memory, and speed of processing, which declines slowly as people age. Sarah is a healthy baby who was exclusively breast-fed for her first 12 months. Which of the following is most likely a description of her weights (at 3, 6, 9, and 12 months of age) as percentiles of the CDC growth chart reference population? 85th percentile at 3 months; 85th percentile at 6 months; 9oth percentile at 9 months; 95th percentile at 12 months 75th percentile at 3 months; 40th percentile at 6 months; 25th percentile at 9 months; 25th percentile at 12 months 30th percentile at 3 months; 50th percentile at 6 months; 70th percentile at 9 months; 80th percentile at 12 months 25th percentile at 3 months; 25th percentile at 6 months; 25th percentile at 9 months; 25th percentile at 12 months