CORRECT DETAILED ANSWERS WITH RATIONALES
RAT 2 CORRECT ANSWER-
What is the output of the following program?
length_x = 3.2
length_y = 2
area_rect = length_x*length_y
print(area_rect) CORRECT
ANSWER-6.4
What is the output of the following code?
num_x = 3
num_y = 2
val_num = num_x//num_y
print(val_num) CORRECT
ANSWER-1
What is the output of the following program?
num_x = 6
num_y = 2
val_num = num_x + num_y
print('val_num') CORRECT ANSWER-
val_num
What is the output of the following program?
num1 = 33
,num2 = 55
, num3 = float(num1)
print(num3) CORRECT ANSWER-33.0
What is the output of the following program?
a = 10
b = 2**4
b -= a
c = b//2
print(c) CORRECT ANSWER-3
RAT 3 CORRECT ANSWER-
What is the value stored in variable X after all the following python statements are executed?
X=2
Y=5
Z = X*Y
X = X*Z - X CORRECT ANSWER-18
Pick the python statement to assign yourCage (an integer value 19) to the variable "my_age"?
CORRECT ANSWER-my_age = 19
Consider the following piece of code:
x = multiplication
typedInput = input('Enter any number: ')
print(typedInput x 2 + str(float(typedInput) x 5))
When executed, the user entered the integer 2 as shown below.
Enter any number: 2