Document1 - Word Fun math practice 1.8 squared is 64 You Python programming teacher wants to see you make a program that accepts input for a name and a few numbers from the user, and then display some fun output using some of the math and built in functions you have learned to use in python. 2. The square root of 144 is 12 3. 7.75 times pi is 24,347343065320896 4, 8 can be displayed as a real number like this: 8.0 5. 7.75 can be displayed rounded to only 1 decimal like this: 7.8 6. The integer value of 7.75 is 7 *Make sure to import the math library before def main and use for square root and the value of pi. *Also remember that the things underlined means the user is typing in some value there, and the math will have to be using their value not the sample values. Hope you had fun seeing some random math that we can do with Python! Please write an algorithm first (no python syntax at all) that will describe the steps needed to ultimately have the output below. Remember to never mention importing a library in an algorithm. Then write the correct Python code under each algorithm step to make the program below. Add any addi- tional code needed (like importing the math library) and comments a programmer might add. Example output- Make it look like this with the user's name and numbers: Welcome to my fun math program! First, what is your name? Bob Hello Bob. Next I am going to ask you for 3 numbers and show you some fun math using them. Enter first number and make sure it is a whole number: 8 Enter second number and make sure it is a whole number with 3 digits: 144 Enter third number and make sure it is a real number with 2 decimal places: 7.75 Okay Bob, are you ready to see some random math.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
The second picture is the example will be preciated can you make cods similar to that the last guy posted I was so lost
11:47
A l 86%i
2-2-2021 program.py- C:\Users\mcucc\OneDrive\Desktop\COP100
File Edit Format Run Options Window Help
conE, 2, 2021
#program to calculate the number of miles trave
#based on user input of kilometers
OPT #define main function
def main () :
#Dclare constant to store conversion
conversion = 0.6214
#Declare and intialize string variabl
name=
#Declare and intialize real variable
kilometers = miles = 0.0
#Display introduction
print("welcome to my miles conversion
print ("i will ask for a number of kil
print ("display the number of miles yo
r.
r.
#prompt user for name
name = input ("what is your name?")
#prompt user for kilometers traveled
kilometers = float(input ("how many kilometer
#set miles = kilometers * conversion
miles = kilometers * conversion
#Display name and miles to user
#user commas in print
print ("great job", name,
#now use concatenation
print ("great job" + name +
your've traviled'
your've travile
#.format method is newer, but sill not the r
print ("great job", name,
" you've traveled C
#f mormatting is the way to go
print (f"great job (name), you've traveld (mi
#Display outro
print ("\nthanks you for using my program! ")
main ()
Transcribed Image Text:11:47 A l 86%i 2-2-2021 program.py- C:\Users\mcucc\OneDrive\Desktop\COP100 File Edit Format Run Options Window Help conE, 2, 2021 #program to calculate the number of miles trave #based on user input of kilometers OPT #define main function def main () : #Dclare constant to store conversion conversion = 0.6214 #Declare and intialize string variabl name= #Declare and intialize real variable kilometers = miles = 0.0 #Display introduction print("welcome to my miles conversion print ("i will ask for a number of kil print ("display the number of miles yo r. r. #prompt user for name name = input ("what is your name?") #prompt user for kilometers traveled kilometers = float(input ("how many kilometer #set miles = kilometers * conversion miles = kilometers * conversion #Display name and miles to user #user commas in print print ("great job", name, #now use concatenation print ("great job" + name + your've traviled' your've travile #.format method is newer, but sill not the r print ("great job", name, " you've traveled C #f mormatting is the way to go print (f"great job (name), you've traveld (mi #Display outro print ("\nthanks you for using my program! ") main ()
Tools
View
Document1 - Word
Fun math practice
1. 8 squared is 64
You Python programming teacher wants to see you make a program that accepts input for a name and a
few numbers from the user, and then display some fun output using some of the math and built in functions
you have learned to use in python.
2. The square root of 144 is 12
3. 7.75 times pi is 24.347343065320896
4. 8 can be displayed as a real number like this: 8.0
5. 7.75 can be displayed rounded to only 1 decimal like this: 7.8
6. The integer value of 7.75 is 7
*Make sure to import the math library before def main and use for square root and the value of pi.
*Also rememnber that the things underlined means the user is typing in some value there, and the math willI
have to be using their value not the sample values.
Hope you had fun seeing some random math that we can do with Python!
Please write an algorithm first (no python syntax at all) that will describe the steps needed to ultimately
have the output below. Remember to never mention importing a library in an algorithm.
End o
Then write the correct Python code under each algorithm step to make the program below. Add any addi-
tional code needed (like importing the math library) and comments a programmer might add.
Example output - Make it look like this with the user's name and numbers:
Welcome to my fun math program!
First, what is your name? Bob
Hello Bob. Next I am going to ask you for 3 numbers and show you some fun math using them.
Enter first number and make sure it is a whole number: 8
Enter second number and make sure it is a whole number with 3 digits: 144
Enter third number and make sure it is a real number with 2 decimal places: 7.75
Okay Bob, are you ready to see some random math.
Screens 1-2 of 2
O Type here to search
Transcribed Image Text:Tools View Document1 - Word Fun math practice 1. 8 squared is 64 You Python programming teacher wants to see you make a program that accepts input for a name and a few numbers from the user, and then display some fun output using some of the math and built in functions you have learned to use in python. 2. The square root of 144 is 12 3. 7.75 times pi is 24.347343065320896 4. 8 can be displayed as a real number like this: 8.0 5. 7.75 can be displayed rounded to only 1 decimal like this: 7.8 6. The integer value of 7.75 is 7 *Make sure to import the math library before def main and use for square root and the value of pi. *Also rememnber that the things underlined means the user is typing in some value there, and the math willI have to be using their value not the sample values. Hope you had fun seeing some random math that we can do with Python! Please write an algorithm first (no python syntax at all) that will describe the steps needed to ultimately have the output below. Remember to never mention importing a library in an algorithm. End o Then write the correct Python code under each algorithm step to make the program below. Add any addi- tional code needed (like importing the math library) and comments a programmer might add. Example output - Make it look like this with the user's name and numbers: Welcome to my fun math program! First, what is your name? Bob Hello Bob. Next I am going to ask you for 3 numbers and show you some fun math using them. Enter first number and make sure it is a whole number: 8 Enter second number and make sure it is a whole number with 3 digits: 144 Enter third number and make sure it is a real number with 2 decimal places: 7.75 Okay Bob, are you ready to see some random math. Screens 1-2 of 2 O Type here to search
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Processes of 3D Graphics
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education