Python :: String review

Python :: String review

University

20 Qs

quiz-placeholder

Similar activities

Pra UPS 2

Pra UPS 2

University

20 Qs

STM 2013 : FORMATIF T3-FORM & REPORT

STM 2013 : FORMATIF T3-FORM & REPORT

University

20 Qs

Chapter 3: Strategic Initiatives for implementing CA

Chapter 3: Strategic Initiatives for implementing CA

University

20 Qs

Basics of computer

Basics of computer

University

15 Qs

Relational Algebra and Calculus

Relational Algebra and Calculus

University

20 Qs

ITN_Explore the networks_1.1 Globally connected

ITN_Explore the networks_1.1 Globally connected

11th Grade - University

20 Qs

Artificial Intelligence CT-1

Artificial Intelligence CT-1

University

20 Qs

Python Recap

Python Recap

7th Grade - University

20 Qs

Python :: String review

Python :: String review

Assessment

Quiz

Computers

University

Practice Problem

Medium

Created by

ALBERTO HILARIO

Used 15+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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()

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?

Discover more resources for Computers