Python Data structures

Python Data structures

Assessment

Quiz

Computers

University

Hard

Created by

Dimitra Mavroforaki

Used 4+ times

FREE Resource

Student preview

quiz-placeholder

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT valid variable name in python?

Myvar123

my_var

1_myvar

_myvar1

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What the answer of the expression 22 % 3 is?

1

7

0

5

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these commands will create a list?

list1=[1,2,3]

list1=list("123")

list1=[]

All of these

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method should I use to convert String "welcome to the beautiful world of python" to "Welcome To The Beautiful World Of Python"

capitalize()

upper()

None of the above

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Following set of commands are executed in shell, what will be the output?

hello

lo

he

hel

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The following is displayed by a print function call:

tom

nick

harry

Select all of the function calls that result in this output

print("tomnickharry")

print("tom

nick

harry")

print("tom\nnick\nharry")

print("tom/nnick/nharry")

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output when following code is executed?

Daman

n

D

Error

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?