What type of value is returned by input()
String
which is true?
6 > 6
6 >= 5
7 < 10
8 == 9
6 >= 5
Name the two types of loops in Python
While and For
Substitution Cipher comes from which type of cryptography ?
Symmetric Cryptography.
What do we call the error that we get if we have a typo? For example, spelling it 'pirnt'
Syntax Error
What is the value of x
x = 5
x = x + 2
7
which phrase do you NEVER expect to see before "else"?
- while
- if
- elif
while
What does this loop print?
for i in range(3):
print(i)
0
1
2
We can reverse hashing with a key ?
No, Hashing happens one way, you need to type same exact plain text or input to get the same hashed text.
Why does this crash?
num = "5"
print(num + 1)
Type error (trying to add the string "5" to the number 1)
Convert the string "42" into an integer
int("42")
Write a condition that checks if age is between 13 and 19 (inclusive).
if age >= 13 and age <= 19:
How many lines will this code output?
for x in range(2, 8):
print("hi")
6
What is one method teams use to gather requirements from clients?
Interviews, surveys, meetings, observation, etc.
Why won’t this print 1–5?
i = 1
while i <= 5:
print(i)
What is the output?
x = 3
y = x * 2
x = 10
print(y)
6
Describe the difference between if and elif
elif will only be checked if the above condition was FALSE. If will be checked every time.
What is wrong with this loop?
What does the Deployment phase do?
Releases the software to users. Code "Goes Live"
How many times does this print?
for i in range(1, 100, -1):
print (i)
0
How many possible values are there for a Boolean type?
2
Identify the bug:
if score = 100:
print("Perfect!")
if score == 100:
Write a loop that prints every number from 5 down to 1.
for i in range(5, 0, -1):
print(i)
Your client says, “This feature isn't what we wanted.” Which SDLC phase likely failed?
Requirements Gathering
Random Trivia:
What year was the very first version of Python released. Points earned for being within 2 years
1991