ENGR 102 very well detailed solutions
New 2025.
ENGR 102 very well detailed solutions
New 2025.
RAT 2
What is the output of the following program?
length_x = 3.2
length_y = 2
area_rect = length_x*length_y
print(area_rect) - 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) - 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') - ANSWER val_num
What is the output of the following program?
,ENGR 102 very well detailed solutions
New 2025.
num1 = 33
num2 = 55
num3 = float(num1)
print(num3) - ANSWER 33.0
What is the output of the following program?
a = 10
b = 2**4
b -= a
c = b//2
print(c) - ANSWER 3
RAT 3 - 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 - ANSWER 18
Pick the python statement to assign your age (an integer value 19) to the variable "my_age"? - ANSWER
my_age = 19
Consider the following piece of code:
x = multiplication
,ENGR 102 very well detailed solutions
New 2025.
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
What will be printed to the console? - ANSWER 2210.0
What is the output printed when the following lines of code are executed? Note that the answer is case
sensitive
x = str(bool(0))
print(x*2) - ANSWER FalseFalse
What will be the output of the following Python code?
print((2 x 5 + (10 // 5) / 10) x 10.0) - ANSWER 102.0
RAT 4 - ANSWER
What is the output for the following program? [Quotes indicate String Data Type]
a = "1"
b = "32"print(a+b) - ANSWER "132"
What is the output of the following program?
a = 23
b = 43
, ENGR 102 very well detailed solutions
New 2025.
a *= 12
b += 13*a
c = a+b
c -= c+5
print(c) - ANSWER -5
The output of the following line of code: int('3.5') WILL produce the value 3.
True or False? - ANSWER False
What is the output of the print statement
a = 10
b = 20
c = 40
d = "Howdy"
print (2*(d) + (d)) - ANSWER HowdyHowdyHowdy
What is the output for the following program if the user enters 19 as Input:
a = float(input("What is your age? "))
print("Input value:", a)
print("Subtracting 2:", a-2) - ANSWER What is your age? 19
Input value: 19.0
Subtracting 2: 17.0
RAT 5 - ANSWER
New 2025.
ENGR 102 very well detailed solutions
New 2025.
RAT 2
What is the output of the following program?
length_x = 3.2
length_y = 2
area_rect = length_x*length_y
print(area_rect) - 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) - 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') - ANSWER val_num
What is the output of the following program?
,ENGR 102 very well detailed solutions
New 2025.
num1 = 33
num2 = 55
num3 = float(num1)
print(num3) - ANSWER 33.0
What is the output of the following program?
a = 10
b = 2**4
b -= a
c = b//2
print(c) - ANSWER 3
RAT 3 - 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 - ANSWER 18
Pick the python statement to assign your age (an integer value 19) to the variable "my_age"? - ANSWER
my_age = 19
Consider the following piece of code:
x = multiplication
,ENGR 102 very well detailed solutions
New 2025.
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
What will be printed to the console? - ANSWER 2210.0
What is the output printed when the following lines of code are executed? Note that the answer is case
sensitive
x = str(bool(0))
print(x*2) - ANSWER FalseFalse
What will be the output of the following Python code?
print((2 x 5 + (10 // 5) / 10) x 10.0) - ANSWER 102.0
RAT 4 - ANSWER
What is the output for the following program? [Quotes indicate String Data Type]
a = "1"
b = "32"print(a+b) - ANSWER "132"
What is the output of the following program?
a = 23
b = 43
, ENGR 102 very well detailed solutions
New 2025.
a *= 12
b += 13*a
c = a+b
c -= c+5
print(c) - ANSWER -5
The output of the following line of code: int('3.5') WILL produce the value 3.
True or False? - ANSWER False
What is the output of the print statement
a = 10
b = 20
c = 40
d = "Howdy"
print (2*(d) + (d)) - ANSWER HowdyHowdyHowdy
What is the output for the following program if the user enters 19 as Input:
a = float(input("What is your age? "))
print("Input value:", a)
print("Subtracting 2:", a-2) - ANSWER What is your age? 19
Input value: 19.0
Subtracting 2: 17.0
RAT 5 - ANSWER