QuestionQuestion

Transcribed TextTranscribed Text

Procedure We are going to calculate different properties involved with cutting a pizza into slices. Create your Python file. When this file is run, the following should happen (see sample run below): Perform these actions (in this order!), storing their answers as needed in variables: • print: "Welcome to the School Supplies Store!" • ask: "What is your name? " • ask: "How many 29-cent pencils do you want? " • store their response. Note – assume this value is a non-negative whole number. • ask: "How many 200-cent sheafs of graph paper do you want? " • store their response. Note – assume this value is a non-negative whole number. • ask: "How many 45-cent scantrons do you want? " • store their response. Note – assume this value is a non-negative whole number. • show them the total cost, with formatting similar to this example (notice, it's all on one line). Total cost: 474 cents • ask: "How many cents are you paying with? " • store their response. Assume this value is a whole number at least as large as their total cost. • show them how much change they have, as well as how many of each denomination from dollars to pennies. Note – don't try to use any bills larger than $1 bills. Also, notice that we don't care whether there are a single or plural number of something; we just always write "quarters" and never try to write out "1 quarter". Your change is 532 cents: 5 dollars 1 quarters 0 dimes 1 nickels 2 pennies • thank the user by name. It must match what they typed at the beginning of the interaction. Thank you, George! Print out everything exactly as in the following example (except the OS-prompt lines, of course). Note that blue text is typed by the user running the code, and that the OS-prompt is red, like demo$ demo$ python3 gmason76_229_P1.py Welcome to the School Supplies Store! What is your name? Mason How many 29-cent pencils do you want? 1 How many 200-cent sheafs of graph paper do you want? 2 How many 45-cent scantrons do you want? 1 Total cost: 474 cents How many cents are you paying with? 1006 Your change is 532 cents: 5 dollars 1 quarters 0 dimes 1 nickels 2 pennies Thank you, Mason! demo$ Note: In this example, the user happened to type in George Mason, 1, 2, 1, and 1006. Your code must work for any name, and any non-negative integers as specified. If you hardcode specific values for the measurements into your code and don’t use user input, you aren't actually solving the program! Notes • Careful! Don't ask additional questions in your code, or ask them out of order; we need you to exactly match the printing order above, for whatever values the user types in. • Precision is the name of the game – when programming, you need to care about details. Make sure you get the spacing exact; uppercase the correct letters; and so on. • There's a bit of extra credit for exactly matching the spacing and formatting. Get these bonus points now, they are some of the easiest to get all semester! (And it makes for happy graders ☺) Assumptions As we are just starting to program, and don't even have if-else statements or exception handling at our disposal, we will assume some things that are not normally allowed for programs to assume. You must assume that: 1.The user will always enter an integer when we ask for an integer, a string when we ask for a string, etc. 2.All numbers the user types in are non-negative. Others are positive when necessary (noted above).

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

# Greeting
print("Welcome to the School Supplies Store!")
# Asks a name and put the information into "name"
name = input("What is your name? ")
# Asks the number of pencils and put the information into "nPencils"
nPencils = input("How many 29-cent pencils do you want? ")
# Asks the number of sheafs and put the information into "nSheafs"
nSheafs = input("How many 200-cent sheafs of graph paper do you want? ")
# Asks the number of scantrons and put the information into "nScantrons"
nScantrons = input("How many 45-cent scantrons do you want? ")...

By purchasing this solution you'll be able to access the following files:
Solution.py.

$38.00
for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Python Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats