Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( 7 0 points ) Problem: Documenting errrors; Getting a program to run On your computer, run your choice of Python IDE ( Wing ,

(70 points) Problem: Documenting errrors; Getting a program to run
On your computer, run your choice of Python IDE (Wing, VS Code or other).
Copy and paste the Python program below into a NEW FILE in the IDE editor of your choice. The program is everything between the two horizontal lines on the page.
Save the program file as
lab1.py.
# Prolog
# Author: YOUR NAME
# Email: YOUR EMAIL euky, edu
" Section: YOUR SECTION
Purpose:
convert meters to millimeters, using fact that
there are 1000 millimeters in 1 meter
Pre-conditions (input):
number of meters (floating point)
Post-conditions (output):
number of meters, floating point with 3 decimals rounded
number of millimeters, floating point with 1 decimals rounded
def main():
# Design and implementation
# 1. Output a message to identify the program, and a blank line
print ("Conversion of meters to millimeters")
print()
# 2. Input amount of meters from user
meters = float (input ("How many meters? ")
Calculate number of millimeters
=1000 millimeters in 1 meter
millimeters = meters +1000
Output resulting millimeters and given number of meters
print()
print ("{:.3f} meters is {:.1f} millimeters." format(meters, millimeters))
main()
dots
Test plan:
Input, Output
5.3455 meters, 5345.6 millimeters
1 meter, 1000,0 millimeters
.123456 meters, 123.5 millimeters
...
image text in transcribed

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

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

4th Edition

0805360476, 978-0805360479

More Books

Students also viewed these Databases questions