Search Header Logo

M3.1 SAQ

Authored by Parker Gaston

Other

University

Used 2+ times

M3.1 SAQ
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

29 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the string concatenation operator in Python?

 

:

+

 

~

 

*

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the repetition operator in Python?

 

:

+

 

~

 

*

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What function returns the numeric Unicode value of a single-character string?

str

chr

ord

num

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which for loop would go through all of the characters in the string named charlie?

 

for ch in characters(charlie)

 

for ch in characters(charlie):

 

for ch in charlie

 

for ch in charlie:

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

True or false: A Python for loop can be used to iterate through the characters in a string.

True

False

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this code?

str = '12345'
sum = ''
for ch in str:
  sum = sum + ch
 
print(sum)

12345

10

15

2345

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is printed when this code is executed?

name = "Roy G Biv"
middleChar = name[4]
print(middleChar

G

 

an empty space

y

'G'

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?