Test 2 Flashcards
Pemdas true statements
right argument of the % operator cannot be zero
The ** operator uses right-sided binding
What is the output of this snippet
2, 4
x = int (input())
y = int (input())
x = x //y
y = y // x
print(y)
code causes input error
output of the following snippet if the user enters two lines containing 3 and 6
x = input()
y = int(input())
print (x * y)
333333
What is the value twenty point twelve ten raised to the power of eight written as
20.12E8
What two variable names are illegal
True
and
What is the output of
y = 2 + 3 * 5.
print (y)
17.0
What is the output of the following snippet if the user enters two lines containing 11 and 4 respectively
x = int(input())
y = int(input())
x = x % y
x = x % y
y = y % y
print(y)
1
the prefix 0o is
octal
output of the following snippet if the user enters two lines 2 and 4 respectively
x = int(input())
y = int(input())
print(x + y)
6
left-sided binding determines that the result of the following expression
1 // 2 * 3
0.166666666666666666
outputs any number of arguments including zero
print()
x = 1 / 2 + 3 // 3 + 4 ** 2
print(x)
what is the output
17.5
The \n diagraph forces the print() function to
break the output line
what is the output of the following snippet if the user enters two lines containing 2 and 4 respectively
x = int(input())
y = int(input())
x = x / y
y = y /
print(y)
8
output of the following snippet
x = 1
x = 2
z = x
x = y
y = z
print(x, y)
2 1