Python :: String review

Python :: String review

University

20 Qs

quiz-placeholder

Similar activities

Fundamentos Web

Fundamentos Web

University

15 Qs

Computer and Other Human Inventions

Computer and Other Human Inventions

University

15 Qs

Input/Output

Input/Output

University

20 Qs

Machine Learning

Machine Learning

University

20 Qs

Soal AIJ bulan Agustus 2019 kls xii

Soal AIJ bulan Agustus 2019 kls xii

University

20 Qs

ICT Unit-2

ICT Unit-2

University

20 Qs

Quiz 1 CCE

Quiz 1 CCE

University

15 Qs

Kuis Pemrograman Dasar

Kuis Pemrograman Dasar

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

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?