Want to create interactive content? It’s easy in Genially!

Get started free

MILLIONAIRE QUIZ

Paty Mogio

Created on December 8, 2023

Start designing with a free template

Discover more than 1500 professional designs like these:

Transcript

String Handling

QUIZ ABOUT

START

GOODLUCK!

10 50.000 POINTS

9 25.600 POINTS

8 12.800 POINTS

7 6.400 POINTS

6 3.200 POINTS

5 1.600 POINTS

4 800 POINTS

3 400 POINTS

2 200 POINTS

1 100 POINTS

Initializing a String variable

Joining strings and variables together

Converting functions to procedures

Checking the length of a variable

What is an example of String Handling?

WRONG!

10 50.000 POINTS

9 25.600 POINTS

8 12.800 POINTS

7 6.400 POINTS

6 3.200 POINTS

5 1.600 POINTS

4 800 POINTS

3 400 POINTS

2 200 POINTS

1 100 POINTS

START OVER?

RIGHT!

10 50.000 POINTS

9 25.600 POINTS

8 12.800 POINTS

7 6.400 POINTS

6 3.200 POINTS

5 1.600 POINTS

4 800 POINTS

3 400 POINTS

2 200 POINTS

1 100 POINTS

.lower() and .upper()

.lower and Upper

.low() and .up()

.Low() and .Upper()

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 ?

WRONG!

10 50.000 POINTS

9 25.600 POINTS

8 12.800 POINTS

7 6.400 POINTS

6 3.200 POINTS

5 1.600 POINTS

4 800 POINTS

3 400 POINTS

2 200 POINTS

1 100 POINTS

START OVER?

RIGHT!

10 50.000 POINTS

9 25.600 POINTS

8 12.800 POINTS

7 6.400 POINTS

6 3.200 POINTS

5 1.600 POINTS

4 800 POINTS

3 400 POINTS

2 200 POINTS

1 100 POINTS

.times()

.count()

.counter()

.char()

What is the easiest way to count how many times a certain value appears within a string?

WRONG!

10 50.000 POINTS

9 25.600 POINTS

8 12.800 POINTS

7 6.400 POINTS

6 3.200 POINTS

5 1.600 POINTS

4 800 POINTS

3 400 POINTS

2 200 POINTS

1 100 POINTS

START OVER?

RIGHT!

10 50.000 POINTS

9 25.600 POINTS

8 12.800 POINTS

7 6.400 POINTS

6 3.200 POINTS

5 1.600 POINTS

4 800 POINTS

3 400 POINTS

2 200 POINTS

1 100 POINTS

length = lenght(fruit)

length = len(fruit)

length = len.fruit

length = fruit.len()

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.

WRONG!

10 50.000 POINTS

9 25.600 POINTS

8 12.800 POINTS

7 6.400 POINTS

6 3.200 POINTS

5 1.600 POINTS

4 800 POINTS

3 400 POINTS

2 200 POINTS

1 100 POINTS

START OVER?

RIGHT!

10 50.000 POINTS

9 25.600 POINTS

8 12.800 POINTS

7 6.400 POINTS

6 3.200 POINTS

5 1.600 POINTS

4 800 POINTS

3 400 POINTS

2 200 POINTS

1 100 POINTS

.separate (variable)

.separate(",")

.split (variable)

.split (",")

Use the ? command to split a string into separate words.

WRONG!

10 50.000 POINTS

9 25.600 POINTS

8 12.800 POINTS

7 6.400 POINTS

6 3.200 POINTS

5 1.600 POINTS

4 800 POINTS

3 400 POINTS

2 200 POINTS

1 100 POINTS

START OVER?

RIGHT!

10 50.000 POINTS

9 25.600 POINTS

8 12.800 POINTS

7 6.400 POINTS

6 3.200 POINTS

5 1.600 POINTS

4 800 POINTS

3 400 POINTS

2 200 POINTS

1 100 POINTS

missing speechmarks

missing brackets

missing equals

missing colon

Spot the error name = input("Enter a name: ") if name.startswith("L") = True: print("I like that name.")

WRONG!

10 50.000 POINTS

9 25.600 POINTS

8 12.800 POINTS

7 6.400 POINTS

6 3.200 POINTS

5 1.600 POINTS

4 800 POINTS

3 400 POINTS

2 200 POINTS

1 100 POINTS

START OVER?

RIGHT!

10 50.000 POINTS

9 25.600 POINTS

8 12.800 POINTS

7 6.400 POINTS

6 3.200 POINTS

5 1.600 POINTS

4 800 POINTS

3 400 POINTS

2 200 POINTS

1 100 POINTS

missing speechmark

missing bracket

missing colon

capital letter

Spot the errorlength = len(password) if length >= 8 print("Password accepted!")

WRONG!

10 50.000 POINTS

9 25.600 POINTS

8 12.800 POINTS

7 6.400 POINTS

6 3.200 POINTS

5 1.600 POINTS

4 800 POINTS

3 400 POINTS

2 200 POINTS

1 100 POINTS

START OVER?

RIGHT!

10 50.000 POINTS

9 25.600 POINTS

8 12.800 POINTS

7 6.400 POINTS

6 3.200 POINTS

5 1.600 POINTS

4 800 POINTS

3 400 POINTS

2 200 POINTS

1 100 POINTS

seb astian

sebastia n

s ebastian

naitsabes

Guess the outputname = "sebastian" print(name[::-1])

WRONG!

10 50.000 POINTS

9 25.600 POINTS

8 12.800 POINTS

7 6.400 POINTS

6 3.200 POINTS

5 1.600 POINTS

4 800 POINTS

3 400 POINTS

2 200 POINTS

1 100 POINTS

START OVER?

RIGHT!

10 50.000 POINTS

9 25.600 POINTS

8 12.800 POINTS

7 6.400 POINTS

6 3.200 POINTS

5 1.600 POINTS

4 800 POINTS

3 400 POINTS

2 200 POINTS

1 100 POINTS

Sar rah

rah Sarah

rah 5

Sar S

Guess the output if input is Sarahname = input("What is your name?") x = len(name) print (name [0:3]) print(name[x-3:x])

WRONG!

10 50.000 POINTS

9 25.600 POINTS

8 12.800 POINTS

7 6.400 POINTS

6 3.200 POINTS

5 1.600 POINTS

4 800 POINTS

3 400 POINTS

2 200 POINTS

1 100 POINTS

START OVER?

RIGHT!

10 50.000 POINTS

9 25.600 POINTS

8 12.800 POINTS

7 6.400 POINTS

6 3.200 POINTS

5 1.600 POINTS

4 800 POINTS

3 400 POINTS

2 200 POINTS

1 100 POINTS

10

Do not write programming notes

Give up TIME exercises

Practice and Confidence - you can all do it!

Repeat to yourself: "I am bad at coding"

What do you need to succeed in Computer Science?

WRONG!

10 50.000 POINTS

9 25.600 POINTS

8 12.800 POINTS

7 6.400 POINTS

6 3.200 POINTS

5 1.600 POINTS

4 800 POINTS

3 400 POINTS

2 200 POINTS

1 100 POINTS

START OVER?

BACK

WELL DONE!

10 50.000 POINTS

9 25.600 POINTS

8 12.800 POINTS

7 6.400 POINTS

6 3.200 POINTS

5 1.600 POINTS

4 800 POINTS

3 400 POINTS

2 200 POINTS

1 100 POINTS

50.000 POINTS

YOU WIN!