M3.1 SAQ

M3.1 SAQ

University

29 Qs

quiz-placeholder

Similar activities

Who Am I? (basketball players)

Who Am I? (basketball players)

KG - University

25 Qs

kuiz phyton

kuiz phyton

University

25 Qs

JavaScript

JavaScript

University

30 Qs

C++ Basics

C++ Basics

University

25 Qs

Разработка приложений в C# 1 аттестация

Разработка приложений в C# 1 аттестация

University

25 Qs

Genetics

Genetics

University

25 Qs

Introduction to Programming - COIT20245 - PASS Session

Introduction to Programming - COIT20245 - PASS Session

University

30 Qs

JAVA

JAVA

University

25 Qs

M3.1 SAQ

M3.1 SAQ

Assessment

Quiz

Other

University

Easy

Created by

Parker Gaston

Used 2+ times

FREE Resource

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'

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?