Question: attempts = 0 while attempts < 3 : miles = float ( input ( ' William , Please enter how many miles you want converted:

attempts =0
while attempts <3:
miles = float(input('William, Please enter how many miles you want converted: '))
# Check if miles is negative and if so end program.
if miles <0:
print('You can not enter a negative number goodbye, William.')
attempts=attempts+1
else:
milesToKilometers = miles *1.6
print('William,', miles, 'Miles is equal to Kilometers:', format(milesToKilometers,',.2f'), "isn't that amazing!")
if attempts==3:
print('You can not enter further inget input in the main function and pass it to the following functions: (LO 2)
a. milesToKm()put')

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!