Question

Write a Python program that will prompt a user for the size of their (round) pizza...

Write a Python program that will prompt a user for the size of their (round) pizza and will output the number of square inches in the pizza. it should be have comment block about date

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

If you have any doubts, please give me comment...

import math

radius = float(input("Enter size of pizza(in inches): "))

no_sq_inches = math.pi*radius*radius

print("Number of square inches in the pizza is %.2f"%no_sq_inches)

Add a comment
Know the answer?
Add Answer to:
Write a Python program that will prompt a user for the size of their (round) pizza...
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
  • python - Write a program that converts square feet to square yards. Prompt the user to...

    python - Write a program that converts square feet to square yards. Prompt the user to enter a value in square feet and then print the converted output along with a message similar to "1 sq. ft. is .11111 sq. yards."

  • Write a graphics python program!!!!!!! to calculate the cost per square inch of a circular pizza...

    Write a graphics python program!!!!!!! to calculate the cost per square inch of a circular pizza and use graphics .py libaray!!!!! . Accept as input the diameter (in inches) and pizza price. Print the cost per square inch. If the cost per square inch is more than $.10 print a message that informing the user that this pizza is too expensive. Otherwise let the user know this is a good deal! and name it pizza.py.....This is a PYTHON language!!!!!!!!!!

  • Write a Python program to prompt the user for an integer number. Assign this integer to...

    Write a Python program to prompt the user for an integer number. Assign this integer to a variable X. Then assign a variable Y to the X**3 (X to the power 3). Finally, assign the variable Z to the square root of Y and print the values of X, Y, and Z as shown in the example below. Use main() function to define and call the program. Example: Enter an integer number: 3 X = 3 if Y=X**3 then Y...

  • 5. Write the Python code to prompt the user for the square footage of their home...

    5. Write the Python code to prompt the user for the square footage of their home Provide them the cost of cleaning their home if it is charged at $0.075/ft2. Be sure to format the output appropriately 5. Write the Python code to prompt the user for the square footage of their home Provide them the cost of cleaning their home if it is charged at $0.075/ft2. Be sure to format the output appropriately

  • Python Programming 4th Edition: Write a program that asks the user for the number of feet....

    Python Programming 4th Edition: Write a program that asks the user for the number of feet. The program converts those feet to inches by using the formula ’12 * feet’. Hint: Define main () program Get the number of feet from the user Define variables Call a function feet_to_inches(feet) The function receives the number of feet and returns the number of inches in that many feet. The output should look like as follows: Enter the number of feet: If the...

  • write a python program a) The program will prompt the user to enter the length of...

    write a python program a) The program will prompt the user to enter the length of the two vertical sides. b) The length of the two horizontal sides will be twice as long as the length of the two vertical sides. c) The rectangle will be filled with the color green

  • 5. Write the Python code to prompt the user for the square footage of their home...

    5. Write the Python code to prompt the user for the square footage of their home Provide them the cost of cleaning their home if it is charged at $0.075/ft2. Be sure to format the output appropriately

  • Write a PYTHON program that reads a file (prompt user for the input file name) containing...

    Write a PYTHON program that reads a file (prompt user for the input file name) containing two columns of floating-point numbers (Use split). Print the average of each column. Use the following data forthe input file: 1   0.5 2   0.5 3   0.5 4   0.5 The output should be:    The averages are 2.50 and 0.5. a)   Your code with comments b)   A screenshot of the execution Version 3.7.2

  • Write a PYTHON program that asks the user for the name of the file. The program...

    Write a PYTHON program that asks the user for the name of the file. The program should write the contents of this input file to an output file. In the output file, each line should be preceded with a line number followed by a colon. The output file will have the same name as the input filename, preceded by “ln” (for linenumbers). Be sure to use Try/except to catch all exceptions. For example, when prompted, if the user specifies “sampleprogram.py”...

  • (The file should have your program and the console input/output of your program) 3.18: Pizza Pi...

    (The file should have your program and the console input/output of your program) 3.18: Pizza Pi Joe’s Pizza Palace needs a program to calculate the number of slices a pizza of any size can be divided into. The program should perform the following steps: Ask the user for the diameter of the pizza in inches. Calculate the number of slices that may be taken from a pizza of that size. Display a message telling the number of slices. To calculate...

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