Search Header Logo

Python Quiz for Class 7 CBSE Board

Authored by Rakesh Kurakula

Computers

7th Grade

Used 1+ times

Python Quiz for Class 7 CBSE Board
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

13 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main purpose of Python programming language?

To increase the cost of program maintenance

To provide a clear and simple syntax that emphasizes readability and reduces the cost of program maintenance.

To prioritize complex syntax over readability

To make programming more difficult and confusing

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a valid data type in Python? A) String B) Float C) Character D) Boolean

B

A

C

D

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? print(3 + 5 * 2)

10

16

13

7

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to start a Python for loop? A) for i in range(5): B) for i = 0; i < 5; i++: C) for i = 1 to 5: D) for i = 1; i < 5; i++

D) for i = 1; i < 5; i++

B) for i = 0; i < 5; i++:

A) for i in range(5):

C) for i = 1 to 5:

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to define a function in Python? A) define my_function(): B) function my_function(): C) def my_function(): D) func my_function():

C) def my_function():

B) function my_function():

D) func my_function():

A) define my_function():

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? def my_function(x, y): return x + y print(my_function(3, 4))

12

7

34

3

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to check if a number is even in Python? A) if num % 2 == 0: B) if num.is_even(): C) if is_even(num): D) if num.even():

A) if num % 2 == 0:

B) if num.is_even():

D) if num.even():

C) if is_even(num):

Access all questions and much more by creating a free account

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?