Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Pease use Python to answer the questions. Thank you so much! 1 . Imagine you're planning a wedding, and you need to transport all your

Pease use Python to answer the questions. Thank you so much!1. Imagine you're planning a wedding, and you need to transport all your wedding guests from the ceremony to the reception. A bus can carry 40 passengers. Please write a program to input the names of the bride(s) and groom(s), and how many guests are coming to the wedding. Then output the names of the couple, followed by how many buses are needed, and the number of extra people you could carry with those buses (empty seats).Sample Output #1:Sample Output #2:Hints and Rules:I recommend you use the math.ceil function to round up to the whole number of buses you need. To do so, import the math module.Your program should work for any two names and any number of guests. (You can assume that the number of guests is greater than 0.)Make sure to test your program with inputs like above: what happens if you have empty space on a bus, like the first sample output? What happens if you fill all the buses exactly, like in the second sample output?2.Write a program that asks the user for survey data about Muni riders, and outputs a summary of that data. (You don't need to do an actual survey - just make up numbers to test with.) Your program should first ask the user which Muni line was surveyed. Then the program asks the user how many days the survey was conducted, and the number of riders that were counted. Your program divides the number of riders by the number of days and outputs the resulting average daily ridership.Your program should behave like shown below, inputting 3 values from the user, and outputting the two lines after, based on that input. (It should not output "Running the program a second time". That's just my way of telling you I'm showing sample output from two different times of running the same program.) The user's input is shown inboldfor clarity, but your program will not show anything in bold.Sample Output----- Running the program a second time ------RulesWhen you output the average number of riders per day, format the output to show just 1 digit after the decimal point, using an f-string as explained in the zyBook section on String formatting.Make sure to put a comment at the top of your program with your name, the name of this assignment and class (CS 10 Muni Assignment), and a brief description of what the program does.Make sure to run your program to test it out (usingreplit.comor the compiler of your choice), and then submit the Python source code and at least two test runs (sample output such as above) showing how your program worked with different inputs.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

6th Edition

1943153035, 978-1943153039

More Books

Students also viewed these Databases questions

Question

List the activities involved in employer-designed HRD programs

Answered: 1 week ago