Want to create interactive content? It’s easy in Genially!
MILLIONAIRE QUIZ
Paty Mogio
Created on December 8, 2023
Start designing with a free template
Discover more than 1500 professional designs like these:
Transcript
QUIZ ABOUT
String Handling
START
GOODLUCK!
1 100 POINTS
6 3.200 POINTS
2 200 POINTS
7 6.400 POINTS
3 400 POINTS
8 12.800 POINTS
4 800 POINTS
9 25.600 POINTS
5 1.600 POINTS
10 50.000 POINTS
What is an example of String Handling?
Checking the length of a variable
Converting functions to procedures
Joining strings and variables together
Initializing a String variable
1 100 POINTS
6 3.200 POINTS
2 200 POINTS
7 6.400 POINTS
WRONG!
3 400 POINTS
8 12.800 POINTS
4 800 POINTS
9 25.600 POINTS
5 1.600 POINTS
10 50.000 POINTS
START OVER?
1 100 POINTS
6 3.200 POINTS
2 200 POINTS
7 6.400 POINTS
RIGHT!
8 12.800 POINTS
3 400 POINTS
9 25.600 POINTS
4 800 POINTS
10 50.000 POINTS
5 1.600 POINTS
String handling is used to examine passwords and to ensure that they are of an acceptable strength. How can you convert a string into a fully lowercase or uppercase ?
.Low() and .Upper()
.low() and .up()
.lower and Upper
.lower() and .upper()
1 100 POINTS
6 3.200 POINTS
2 200 POINTS
7 6.400 POINTS
WRONG!
3 400 POINTS
8 12.800 POINTS
4 800 POINTS
9 25.600 POINTS
5 1.600 POINTS
10 50.000 POINTS
START OVER?
1 100 POINTS
6 3.200 POINTS
2 200 POINTS
7 6.400 POINTS
RIGHT!
3 400 POINTS
8 12.800 POINTS
4 800 POINTS
9 25.600 POINTS
5 1.600 POINTS
10 50.000 POINTS
What is the easiest way to count how many times a certain value appears within a string?
.char()
.counter()
.count()
.times()
1 100 POINTS
6 3.200 POINTS
2 200 POINTS
7 6.400 POINTS
WRONG!
3 400 POINTS
8 12.800 POINTS
4 800 POINTS
9 25.600 POINTS
5 1.600 POINTS
10 50.000 POINTS
START OVER?
1 100 POINTS
6 3.200 POINTS
2 200 POINTS
7 6.400 POINTS
RIGHT!
3 400 POINTS
8 12.800 POINTS
4 800 POINTS
9 25.600 POINTS
5 1.600 POINTS
10 50.000 POINTS
We use the len command to see how many characters are in a string. It is sensible to save the result of the function into a variable so it can be used later.
length = fruit.len()
length = len.fruit
length = len(fruit)
length = lenght(fruit)
1 100 POINTS
6 3.200 POINTS
2 200 POINTS
7 6.400 POINTS
WRONG!
3 400 POINTS
8 12.800 POINTS
4 800 POINTS
9 25.600 POINTS
5 1.600 POINTS
10 50.000 POINTS
START OVER?
1 100 POINTS
6 3.200 POINTS
2 200 POINTS
7 6.400 POINTS
RIGHT!
3 400 POINTS
8 12.800 POINTS
4 800 POINTS
9 25.600 POINTS
5 1.600 POINTS
10 50.000 POINTS
Use the ? command to split a string into separate words.
.split (",")
.split (variable)
.separate(",")
.separate (variable)
1 100 POINTS
6 3.200 POINTS
2 200 POINTS
7 6.400 POINTS
WRONG!
3 400 POINTS
8 12.800 POINTS
4 800 POINTS
9 25.600 POINTS
5 1.600 POINTS
10 50.000 POINTS
START OVER?
1 100 POINTS
6 3.200 POINTS
2 200 POINTS
7 6.400 POINTS
RIGHT!
3 400 POINTS
8 12.800 POINTS
4 800 POINTS
9 25.600 POINTS
5 1.600 POINTS
10 50.000 POINTS
Spot the error name = input("Enter a name: ") if name.startswith("L") = True: print("I like that name.")
missing colon
missing equals
missing brackets
missing speechmarks
1 100 POINTS
6 3.200 POINTS
2 200 POINTS
7 6.400 POINTS
WRONG!
3 400 POINTS
8 12.800 POINTS
4 800 POINTS
9 25.600 POINTS
5 1.600 POINTS
10 50.000 POINTS
START OVER?
1 100 POINTS
6 3.200 POINTS
2 200 POINTS
7 6.400 POINTS
RIGHT!
3 400 POINTS
8 12.800 POINTS
4 800 POINTS
9 25.600 POINTS
5 1.600 POINTS
10 50.000 POINTS
Spot the errorlength = len(password) if length >= 8 print("Password accepted!")
capital letter
missing colon
missing bracket
missing speechmark
1 100 POINTS
6 3.200 POINTS
2 200 POINTS
7 6.400 POINTS
WRONG!
3 400 POINTS
8 12.800 POINTS
4 800 POINTS
9 25.600 POINTS
5 1.600 POINTS
10 50.000 POINTS
START OVER?
1 100 POINTS
6 3.200 POINTS
2 200 POINTS
7 6.400 POINTS
RIGHT!
3 400 POINTS
8 12.800 POINTS
4 800 POINTS
9 25.600 POINTS
5 1.600 POINTS
10 50.000 POINTS
Guess the outputname = "sebastian" print(name[::-1])
naitsabes
s ebastian
sebastia n
seb astian
1 100 POINTS
6 3.200 POINTS
2 200 POINTS
7 6.400 POINTS
WRONG!
3 400 POINTS
8 12.800 POINTS
4 800 POINTS
9 25.600 POINTS
5 1.600 POINTS
10 50.000 POINTS
START OVER?
1 100 POINTS
6 3.200 POINTS
2 200 POINTS
7 6.400 POINTS
RIGHT!
3 400 POINTS
8 12.800 POINTS
4 800 POINTS
9 25.600 POINTS
5 1.600 POINTS
10 50.000 POINTS
Guess the output if input is Sarahname = input("What is your name?") x = len(name) print (name [0:3]) print(name[x-3:x])
Sar S
rah 5
rah Sarah
Sar rah
1 100 POINTS
6 3.200 POINTS
2 200 POINTS
7 6.400 POINTS
WRONG!
3 400 POINTS
8 12.800 POINTS
4 800 POINTS
9 25.600 POINTS
5 1.600 POINTS
10 50.000 POINTS
START OVER?
1 100 POINTS
6 3.200 POINTS
2 200 POINTS
7 6.400 POINTS
RIGHT!
8 12.800 POINTS
3 400 POINTS
4 800 POINTS
9 25.600 POINTS
5 1.600 POINTS
10 50.000 POINTS
What do you need to succeed in Computer Science?
Repeat to yourself: "I am bad at coding"
Practice and Confidence - you can all do it!
10
Do not write programming notes
Give up TIME exercises
1 100 POINTS
6 3.200 POINTS
2 200 POINTS
7 6.400 POINTS
WRONG!
3 400 POINTS
8 12.800 POINTS
4 800 POINTS
9 25.600 POINTS
5 1.600 POINTS
10 50.000 POINTS
START OVER?
WELL DONE!
1 100 POINTS
6 3.200 POINTS
2 200 POINTS
7 6.400 POINTS
3 400 POINTS
8 12.800 POINTS
4 800 POINTS
9 25.600 POINTS
5 1.600 POINTS
10 50.000 POINTS
YOU WIN!
50.000 POINTS
BACK