subject
Computers and Technology, 12.07.2021 17:10 kbuhvu

If we were ever to use this pizza ordering program again, we would want to use mainline logic to control its execution. The way it is written, it will automatically execute as soon as it is imported. Re-write this program, enclosing the top level code into the main function. Then execute the main function. Enter appropriate input so the output matches that under Desired Output.
# Define Function
def pizza(meat="cheese", veggies="onions"):
print("You would like a", meat, "pizza with", veggies)
# Get the User Input
my_meat = input("What meat would you like? ")
my_veggies = input("What veggie would you like? ")
# Call the Function
pizza(meat=my_meat, veggies=my_veggies)
desired output:
What meat would you like? cheese
What veggie would you like? onions
You would like a cheese pizza with onions
2) We want to generate 5 random numbers, but we need the random module to do so. Import the random module, so the code executes.
# Define main function
def main():
print("Your random numbers are:")
for i in range(5):
print(random. randint(1, 10))
# Call main function
main()
desired output:
Your random numbers are:
[x]
[x]
[x]
[x]
[x]

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 13:30
In mmf2, what is the grid? a. a toolbar that lets you open libraries and use the objects in them in your games b. an object that creates the background or other scenery for a game c. a set of vertical and horizontal lines that are usually invisible in the play area d. a set of vertical and horizontal lines that are usually visible in the play area
Answers: 1
question
Computers and Technology, 24.06.2019 02:10
Aspeed limit sign that says "night" indicates the legal speed between sunset and sunrise.
Answers: 2
question
Computers and Technology, 24.06.2019 12:00
How can we take picture in this app
Answers: 1
question
Computers and Technology, 24.06.2019 17:40
This assignment continues work on the online booking facility introduced at the end of chapter- 10. the work will be continued in the assignments for chapters 14 and 15 (a) assume that you will produce your online booking facility using an agile approach. i. suggest the kind of user research you would like to conduct for your product before iteration cycles begin. ii prioritize the requirements for your product according to business value, i.e which requirements are likely to provide the greatest business benefit, and sketch out the ux design work you would expect to undertake during the first four iteration cycles, i.e. cycle 0, and cycles 1 to 3. (b) using one of the mockup tools introduced above, generate a mockup of your product's landing page, as developed in the assignment for chapter-11 (c) using one of the patterns websites listed previously, identify suitable interaction patterns for elements of your product, and develop a software-based prototype that incorporates all the feedback and the results of the user experience mapping achieved at the end of chapter-11. if you do not have experience in using any of these, create a few html web pages to represent the basic structure of your website
Answers: 2
You know the right answer?
If we were ever to use this pizza ordering program again, we would want to use mainline logic to con...
Questions
question
English, 15.10.2019 14:00
question
Health, 15.10.2019 14:00
question
History, 15.10.2019 14:00
Questions on the website: 13722363