15,938,122 members
1.00/5 (1 vote)
See more:
I need this code for an assignment please:

Write the algorithm and Python code to convert measurements made in inches to millimeters. The conversion is as follows: 1 inch is equivalent to 25 millimeters. The program should ask the user if they would like to convert another measurement and run again if “y” or “Y” is entered by the user. Any other entry should cause the program to terminate. Enter multi-line comments as needed and test the code.

And what I have so far is this:

#This program converts measurements made in inches to millimeters.
"""

Created By:
Date: 12/14/2017
Class: CSIT 100-41
"""

DoAgain = "Yes";

while DoAgain == "Yes" or DoAgain == "y":
print("Welcome to the Conversion Calculator")

Inches= float(input("Please enter the number of inches: "))

Total= Inches * .25

What I have tried:

#This program converts measurements made in inches to millimeters.
"""

Created By:
Date: 12/14/2017
Class: CSIT 100-41
"""

DoAgain = "Yes";

while DoAgain == "Yes" or DoAgain == "y":
print("Welcome to the Conversion Calculator")

Inches= float(input("Please enter the number of inches: "))

Total= Inches * .25
Posted
Patrice T 15-Dec-17 0:30am
"I think its wrong"
What make you think it is wrong?
Richard MacCutchan 15-Dec-17 4:16am
This has nothing to do with programming; you are using the wrong value in your conversion calculation. Open your calculator, or use Google, to see what number to use to convert inches to millimeters.