1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ksivusya [100]
3 years ago
7

Write the Python code to implement each step of the following algorithm. Your code should use descriptive variable names and per

form all of the calculations necessary using the variables you define. You should not manually perform any calculation.
Computers and Technology
1 answer:
Lina20 [59]3 years ago
6 0

Answer:

# the number of pizza is initialised

# to 5

number_of_pizza = 5

# number of slice in each pizza

# is initialised to 8

slice_in_each_pizza = 8

# total number of pizza is calculated

total_number_of_slices = number_of_pizza * slice_in_each_pizza

# number of guest who respond yes

# is initialised to 10

number_of_guest_respond_yes = 10

# additional 3 guest is added to existing guest

number_of_guest_respond_yes += 3

# number of left over slice is gotten by using modulo arithmetic

number_of_left_over_slice = total_number_of_slices % number_of_guest_respond_yes

# the number of left over slice

# is printed which is 1

print(number_of_left_over_slice)

Explanation:

Missing Question Part: Use a variable to store the number of pizzas ordered as 5.

Assuming there are 8 slices in each pizza, use a variable to store the total number of slices calculated using the number of pizzas ordered.

Use another variable to store the number of guests who had responded YES as 10.

Three more people responded YES. Update the corresponding variable using an appropriate expression.

Based on the guest count, set up an expression to determine the number of left-over slices if the slices would be evenly distributed among the guests. Store the result of the expression in a variable.

The program is written in Python and it is well commented.

You might be interested in
What are the five generations of computers?​
inysia [295]

Answer:

First Generation, Second Generation, Third Generation, Fourth Generation, Fifth Generation

Explanation:

First Generation- Vacuum Tubes

Second Generation- Transistors

Third Generation- Integrated Circuits

Fourth Generation- Microprocessors

Fifth Generation- Artificial Intelligence

4 0
3 years ago
How to turn off microsoft teams message notifications
Andru [333]

Answer:

simply go to settings and turn it off.

Explanation:

i can help you

first tell you use pc or mobilephone

and secondly what type of notifications? message or call or meeting

5 0
3 years ago
Brian is selecting an authentication protocol for a PPP connection. He would like to select an option that encrypts both usernam
aleksklad [387]

Answer:

CHAP

Explanation:

CHAP or Challenge-Handshake Authentication Protocol is the best option for Brian´s PPP connection. CHAP allows to validate the identity of users by using the three-way handshake at the first time of the connection and again at any moment after establishing the initial communication.

8 0
3 years ago
HELP ME PLEASE <br> Can you help get back my ro blox account: (LOLCrashForce)
abruzzese [7]

Answer: sorry we cannot help

Explanation:

5 0
3 years ago
Read 2 more answers
The most commonly used traffic control devices used in road construction and maintenance work areas are
svet-max [94.6K]
The answer that best completes the statement above is this: <span>signs, barricades, drums, cones, tubes, flashing arrow panels, and flag individuals. The main purpose of these traffic control devices is to signal the drivers to stop or to slow down and to change lanes most especially in areas that are undergoing construction.</span>
3 0
3 years ago
Other questions:
  • Explain how do we combine multiple Boolean values?​
    5·1 answer
  • hey computor guys. is the MSI B250M GAMING PRO LGA 1151 Intel B250 HDMI SATA 6Gb/s USB 3.1 Micro ATX Motherboards - Intel compat
    8·1 answer
  • Write a program that will ask the user to input a phrase (multiple word sentence), and an integer value. A static function will
    14·1 answer
  • ______ is the software that prevents people from being able to access your personal information.
    8·2 answers
  • When installing a device driver, start the computer in
    6·1 answer
  • How does cryptocurrency exchange software works?
    14·1 answer
  • Which area of study involves microeconomWhich area of study involves microeconomics? A. a nation's ability to meet consumer dema
    10·1 answer
  • Please help explain this calculator code.
    15·1 answer
  • Areas on which the development of the computer as a communication technology is based
    5·1 answer
  • SOMEONE HELP ME PLEASE <br> What are three reasons technology is beneficial to teens
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!