Programming Flashcards

(5 cards)

1
Q

How to make a loop keep repeating until a certain input is added

A

password = str(input(“Input password”))

while password != “secret”:
password = input(“Input password”)

print(“Access granted”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to make a string uppercase

A

text = “hello”
print(text.upper())

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How to make a string lowercase

A

text = “hello”
print(text.lower())

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How to reverse a string

A

text = “hello”
reversed_text = text[::-1]
print(reversed_text)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is erroneous data now called

A

Invalid boundary

How well did you know this?
1
Not at all
2
3
4
5
Perfectly