66 Fall 2015 Midterm [10: 2 each! For each of the following, any variables menti
ID: 3606192 • Letter: 6
Question
66 Fall 2015 Midterm [10: 2 each! For each of the following, any variables mention below have values and are of a proper data-type Your Initials: 7· write a single (that is, one) Python statement. Assume that a Tell the user to Enter by the user. name, then read in, and assign to a variable a string typed in na e your typed nter age, then read in, and assign to a variable, an integer by the user. your ut on separate lines, Your name is varl and Your age is var2, where varl and var2 are the values of the two variables entered above Create, and save in a variable, a new list containing all but the first and last values in the list variable scores d. Set the variables sum and product to the sum of x and y and the product of x and y, respectively e.Explanation / Answer
a) name = input("Enter your name: ")
b) age = int(input("Enter your age: "))
c)
print("Your name is ",name)
print("Your age is ",age)
d) scores = []
scores[0] = name
scores[1] = age
E) x = 5
y = 10
product = x*y
sum = x+y
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.