Question: #4-7 4) Write Python statements to prompt for and collect values from a user The values are the time in hours and minutes (two integer
4) Write Python statements to prompt for and collect values from a user The values are the time in hours and minutes (two integer quantities) hours = input("What is the hour? ") minutes = input("What is the minute? ") time str(hours) + ":" + str(minutes) print time 5) The variables age and weight currently have the values 32 and 187, respectively. Write the exact output generated by the following statement print("Your age is" + str(age) +"and your weight is" str(weight)) 6) What is the output after the following sequence of statements is executed? a = 12 b = 20 b = 5+1 a = a + b print(2-a) 7) Given the statements: myName="Fred" myLastName="Jones" Write a python statement to output My name is Fred Jones and I am a good student
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
