Python Basics Worksheet

Python Basics Worksheet

9th Grade

26 Qs

quiz-placeholder

Similar activities

Artificial Intelligence

Artificial Intelligence

9th - 12th Grade

21 Qs

Leccion Roblox Studio Smartcamp

Leccion Roblox Studio Smartcamp

9th - 12th Grade

22 Qs

IGCSE CH 1, 2, and 3 Revision and Support 2

IGCSE CH 1, 2, and 3 Revision and Support 2

9th - 10th Grade

26 Qs

computer science

computer science

KG - Professional Development

23 Qs

Steve Jobs

Steve Jobs

6th - 12th Grade

22 Qs

The Transport Layer

The Transport Layer

9th Grade

21 Qs

Networks: End of Unit Quiz

Networks: End of Unit Quiz

7th - 9th Grade

22 Qs

CP M.11 Review

CP M.11 Review

9th - 12th Grade

22 Qs

Python Basics Worksheet

Python Basics Worksheet

Assessment

Quiz

Computers

9th Grade

Practice Problem

Hard

Created by

Bouazza Bilam

Used 4+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

26 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A variable in Python is:

a named location used to store data

a type of loop

a built-in function

a Python module

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Assigning a value to a variable in Python is done by:

using the = operator

using the := operator only

using the == operator

using the => operator

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of: python x = 5 y = "5" print(x + int(y))

10

55

TypeError

5

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A variable name can start with a digit in Python. Which of the following statements is correct?

No, variable names cannot start with a digit in Python.

Yes, variable names can start with a digit in Python.

Variable names must always start with a digit in Python.

Variable names can only start with special characters in Python.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The difference between = and == in Python is:

= is used for assignment, == is used for comparison

= is used for comparison, == is used for assignment

Both are used for assignment

Both are used for comparison

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The output of 3 ** 2 in Python is:

6

9

8

5

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The difference between // and / operators can be explained with the example: 7 // 2 gives 3, while 7 / 2 gives 3.5. Which of the following best describes this difference?

// gives the integer division result, while / gives the floating-point division result.

// gives the floating-point division result, while / gives the integer division result.

Both // and / give the same result for all numbers.

// is used for multiplication, while / is used for division.

Create a free account and access millions of resources

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?

Discover more resources for Computers