Python Quiz

Python Quiz

Professional Development

10 Qs

quiz-placeholder

Similar activities

UDC 2022

UDC 2022

Professional Development

10 Qs

Mastering KineMaster

Mastering KineMaster

Professional Development

10 Qs

KOE034: Sensors and Instruments

KOE034: Sensors and Instruments

Professional Development

11 Qs

Maintain Files and Folders

Maintain Files and Folders

Professional Development

10 Qs

OWASP Top 10

OWASP Top 10

Professional Development

10 Qs

Computer Hardware and Software Quiz

Computer Hardware and Software Quiz

Professional Development

10 Qs

Python Test 1

Python Test 1

Professional Development

10 Qs

Gen. Assembly Recap Day 1

Gen. Assembly Recap Day 1

Professional Development

15 Qs

Python Quiz

Python Quiz

Assessment

Quiz

Computers

Professional Development

Practice Problem

Medium

Created by

mari renga

Used 14+ times

FREE Resource

AI

Enhance your content in a minute

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

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

what is the output of print str * 2 if str = 'Hello World!'?

Hello World!Hello World!

Hello World! * 2

Hello World!

None of the above

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

what is the result of the following operation in Python:

3+ 2 * 2

10

12

9

7

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

If you executed name = 'Lizz' , what would be the output of print (name[0:2])?

Li

Zz

Lizz

L

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

If you executed var = '01234567' , what would be the result of print(var[::2])?

0246

01234

1234

7531

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

what is the result of the following operation '1'+'2'

3

1

2

12

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Given myvar = 'hello', how would you convert myvar into uppercase?

len(myvar)

upper(myvar)

myvar.upper()

myvar.upper(myvar)

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

which of the following are valid ways to specify the string literal foo'bar in Python:

"""foo'bar"""

'foo\'bar'

foo'bar

foo"bar

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?