Question

In Python please. At Jenny’s birthday party she orders a 32-piece pizza. Have the user enter...

In Python please. At Jenny’s birthday party she orders a 32-piece pizza. Have the user enter the number of people at the party that will be eating pizza and output the number of slices each one gets. As you know the pizza might not divide evenly. There are two ways to handle this. The first is to ignore the extra pieces and give everyone the same amount. The second way is to cut up the extra pieces so that everyone gets the same amount. Your program must output both options so it might look like the following: Sample Output

0 0
Add a comment Improve this question Transcribed image text
Answer #1

hey you didnt provide the sample output

so assuming this i provided the code.If any thing wrong please drop a comment i will modify the code.

Thank you

1 n=32 t=intinput(Enter the total no of guests: )) 3 print(first way) 4 print(every one will get {} pizzas with {} lefto

Code for copying

n=32
t=int(input("Enter the total no of guests: "))
print("first way")
print("every one will get {} pizzas with {} leftover".format(int(n/t),n%t))
print("second way")
print("every one will get {}".format(round(n/t)))

Add a comment
Know the answer?
Add Answer to:
In Python please. At Jenny’s birthday party she orders a 32-piece pizza. Have the user enter...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • You need not run Python programs on a computer in solving the following problems. Place your...

    You need not run Python programs on a computer in solving the following problems. Place your answers into separate "text" files using the names indicated on each problem. Please create your text files using the same text editor that you use for your .py files. Answer submitted in another file format such as .doc, .pages, .rtf, or.pdf will lose least one point per problem! [1] 3 points Use file math.txt What is the precise output from the following code? bar...

  • Please read the article and answer about questions. You and the Law Business and law are...

    Please read the article and answer about questions. You and the Law Business and law are inseparable. For B-Money, the two predictably merged when he was negotiat- ing a deal for his tracks. At other times, the merger is unpredictable, like when your business faces an unexpected auto accident, product recall, or government regulation change. In either type of situation, when business owners know the law, they can better protect themselves and sometimes even avoid the problems completely. This chapter...

  • I need help with my very last assignment of this term PLEASE!!, and here are the instructions: After reading Chapter T...

    I need help with my very last assignment of this term PLEASE!!, and here are the instructions: After reading Chapter Two, “Keys to Successful IT Governance,” from Roger Kroft and Guy Scalzi’s book entitled, IT Governance in Hospitals and Health Systems, please refer to the following assignment instructions below. This chapter consists of interviews with executives identifying mistakes that are made when governing healthcare information technology (IT). The chapter is broken down into subheadings listing areas of importance to understand...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT