Python - Strings

Python - Strings

Professional Development

25 Qs

Similar activities

CodeHS - Intro to Python - Basics and Console Interaction

CodeHS - Intro to Python - Basics and Console Interaction

9th Grade - Professional Development

20 Qs

Python Programming Fundamental

Python Programming Fundamental

Professional Development

20 Qs

VCE TalentNext-2021 Quiz-2

VCE TalentNext-2021 Quiz-2

Professional Development

20 Qs

Javascript Fundamental Practice

Javascript Fundamental Practice

Professional Development

20 Qs

Java Basics

Java Basics

Professional Development

25 Qs

first round quiz

first round quiz

Professional Development

20 Qs

HiTech Quiz 6

HiTech Quiz 6

Professional Development

22 Qs

Fundamentals I. Principio de módulo

Fundamentals I. Principio de módulo

Professional Development

20 Qs

Python - Strings

Python - Strings

Assessment

Quiz

Created by

Lucy Stephenson

Computers

Professional Development

12 plays

Hard

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Python, what symbol do you use to concatenate a string?

*

-

+

/

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this code?

fruit = "apple"

print (len(fruit))

2

3

4

5

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this code?

message = "I love Computer Science!"

print (len(message))

21

22

23

24

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this code?

homework = "Mrs Stephenson, can I have extra homework?"

print (len(homework))

12

22

32

42

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this code?

colour = "Green"

print (colour.upper())

Green

GREEN

Syntax error

green

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this code?

Subject = "Computer Science"

print (Subject.lower())

16

COMPUTER SCIENCE

computer science

Syntax error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this code?

animal = "cat"

print (cat.lower())

CAT

cat

3

Syntax error

Answer explanation

Wrong variable name.

Incorrect

animal = "cat"

print (animal.lower())

Correct

animal = "cat"

print (animal.lower())

Explore all questions with a free account

or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?