Question: check answer to question 2 D. Suppose that the variable x currently has the value 20. What statement would cause the value of to become
D. Suppose that the variable x currently has the value 20. What statement would cause the value of to become 28? 1. X + 8) 2X + 8 3. X = X + 8 4. None. The value of x can't be changed. E. What is the result of evaluating 9 // 2? F. What is the result of evaluating 2 / 10? .2 G. To use a Python module such as math or random, you must have an) L statement at the top of your code. (True or False) If you divide an integer by an integer using / the result will be a float. Question 2 (10 points) Consider the following Python program fragment: num = 64 for i in range(4): num = num // 2 print (num) A. How many times will the definite loop execute its body? 4 B. List the values of i in the loop: C. List the values of num up until the end of the program: 501,2,33 4, 8, 16, 323 D. What will be the output of the fragment (.e. the final value of num)? 32 Question 3 (10 points) Write Python commands to ask the user for a number between 1 and 13, explicitly convert the type to a floating point value and assign it to the identifier called card
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
