Python :: String review

Python :: String review

University

20 Qs

quiz-placeholder

Similar activities

Python Basic Quiz 01

Python Basic Quiz 01

University

17 Qs

ASK F2 -KOD ARAHAN (PYTHON)

ASK F2 -KOD ARAHAN (PYTHON)

1st Grade - University

15 Qs

C Programming

C Programming

University

20 Qs

General Python year 10

General Python year 10

9th Grade - University

20 Qs

Python Programming Functions Q3

Python Programming Functions Q3

University

20 Qs

Introduction to Python

Introduction to Python

KG - University

25 Qs

Python Recap

Python Recap

7th Grade - University

20 Qs

Python Strings

Python Strings

University

20 Qs

Python :: String review

Python :: String review

Assessment

Quiz

Computers

University

Medium

Created by

ALBERTO HILARIO

Used 15+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following adds a line comment in Python?

// comment here

# comment here

"" comment here

/* comment here */

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following concatenates strings in Python?

'hello' & 'world'

'hello' -> 'world'

'hello' += 'world'

'hello' + 'world'

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following will produce "ppp"?

'p' *= 3

'p' = 'p'*3

'p' * 3

'p' x 3

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of print('python'[0:2])?

py

yt

pyt

on

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of print('python'[1:4])?

pyth

yth

ytho

pyt

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of print('HELLO WORLD'.lower())?

hello world

Hello world

HELLO WORLD

Hello World

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How would you capitalize 'hello world'?

'hello world'.uppercase()

'hello world'.upper()

'hello world'.toUpper()

'hello world'.go_upper()

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?