Python :: String review

Python :: String review

University

20 Qs

quiz-placeholder

Similar activities

COA_QUIZ_UNIT I

COA_QUIZ_UNIT I

University

20 Qs

have fun with econometrics

have fun with econometrics

University

15 Qs

Evaluasi 2 (Mathematica-Phyton)

Evaluasi 2 (Mathematica-Phyton)

University

20 Qs

Round 2 for Preplacement Bootcamp

Round 2 for Preplacement Bootcamp

University

15 Qs

NACOS Kahoot Session II

NACOS Kahoot Session II

University

20 Qs

Chapter 5 Mid Term Quiz - Computer System -

Chapter 5 Mid Term Quiz - Computer System -

5th Grade - University

20 Qs

computers

computers

KG - Professional Development

15 Qs

DIET BHUJ ICT

DIET BHUJ ICT

University

15 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

Already have an account?