Search Header Logo

Python Basics

Authored by Melih Gülcan

Computers

6th - 8th Grade

Python Basics
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which Python operator is used for exponentiation?

/

^

**

//

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will the following code print?

27

19

15

17

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

How many times will this for loop execute?

1

2

3

4

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which loop is best when the number of iterations is unknown?
A)
B)
C)
D)

for loop

while loop

do-while loop

Infinite loop

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the following code?

Yes

No

True

Nothing

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid way to declare a function in Python?

function myFunc() {}

def myFunc():

myFunc() => {}

function: myFunc()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code snippet?
print(2 * 3 + 1)

8

5

6

7

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?