day 2

day 2

University

10 Qs

quiz-placeholder

Similar activities

Quiz Algoritma Looping

Quiz Algoritma Looping

University

15 Qs

Python_R

Python_R

2nd Grade - Professional Development

8 Qs

Computational Thinking in Python[Quiz 2]

Computational Thinking in Python[Quiz 2]

University

15 Qs

Python Day 8

Python Day 8

University

7 Qs

Python list starter

Python list starter

10th Grade - University

12 Qs

Python Unit 3

Python Unit 3

University

10 Qs

Python quick quiz

Python quick quiz

University

10 Qs

Biyani College Day 4

Biyani College Day 4

University

15 Qs

day 2

day 2

Assessment

Quiz

Computers

University

Hard

Created by

yousof diaa

Used 3+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

1. What is the correct way to declare an empty list in Python?

my_list = {}
my_list = [ ]
my_list = list( )

my_list = list[]

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

2. In Python, how do you access the value associated with the key 'age' in the dictionary person?

person.age
person['age']
person.get('age')
person['name']

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

x = "moyo"

for( i in x) :

print(i)
predict output ?

m o y o

moyo

m
o
y
o

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

my_dict = {'apple': 3, 'banana': 2, 'orange': 5}
result = len(my_dict.keys())

result2 = len(my_dict)
print(result, result2)

3,6

6,3

3,3

error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

5.how to print a dictionary in Python?

print(dictionary_name{})

print(dictionary_name)
display(dictionary_name)
show(dictionary_name)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

n = 1

while(n>0) :

n = n+1

what happens ?

infinite loop

the loop doesnt start

n reaches 1000 and stops

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

7. What does the append function do with a list in Python?

it adds an element into the beginning of the list

It reverses the order of the elements in the list.
It creates a new list with the appended element.
It adds an element to the end of the list.

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?