Python Quiz

Python Quiz

5th Grade

30 Qs

quiz-placeholder

Similar activities

Computer Pretest1(Arduino Grade8_t1)

Computer Pretest1(Arduino Grade8_t1)

3rd Grade - University

25 Qs

Kuiz ICT Pengaturcaraan

Kuiz ICT Pengaturcaraan

1st - 12th Grade

25 Qs

Latihan-PWPB-XI RPL 1

Latihan-PWPB-XI RPL 1

1st - 10th Grade

25 Qs

java quiz-2

java quiz-2

1st - 10th Grade

25 Qs

Informática Aplicada ELECT - PseInt, Python 04

Informática Aplicada ELECT - PseInt, Python 04

5th Grade

25 Qs

Python

Python

KG - Professional Development

35 Qs

2 Python (переменные, типы данных)

2 Python (переменные, типы данных)

5th - 12th Grade

33 Qs

python

python

KG - Professional Development

30 Qs

Python Quiz

Python Quiz

Assessment

Quiz

Computers

5th Grade

Hard

Created by

REENA. S

Used 7+ times

FREE Resource

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the importance of the init method in a class?

 It initializes all the classes in code

It imports all the modules required for the program

It initializes the attributes of a class when an object is created

None of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the code ? 

Mylist = [1,2,3,5,3,4,6,9]

Mylist[-6:6]

[]

 [3, 5, 3, 4]

 [4, 3, 5, 3]

Index Error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the method that is bound to class but not the instance?

Static method

Class method

Main Method

None of the above

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a generator in Python?

The function that generates random numbers of specified count

 The function that generates an error when a warning occurs

 The function that gives a statement as output rather than a retur

The function that returns a generic object

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is used to print the doc string of a function?

myFun.doc()

 doc(myFun)

doc(myFun)

myFun.__doc__

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. What is the output of the below code?

            a1,b1,c1=1,2,3,4,5

               print(b1)

2

4

1,2,3,4,5

ValueError

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. What is the output of the below code?

List=list(range(-5,5,2))

len(List)

2

5

10

7

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?