Python Variables Quiz

Python Variables Quiz

11th Grade

20 Qs

quiz-placeholder

Similar activities

IST P-STEM Unit 1 Hardware and Python Review

IST P-STEM Unit 1 Hardware and Python Review

8th - 12th Grade

20 Qs

Code.org CSP Unit 4 Review

Code.org CSP Unit 4 Review

9th - 12th Grade

16 Qs

PYTHON PROGRAMMING FUNDAMENTALS

PYTHON PROGRAMMING FUNDAMENTALS

11th Grade

15 Qs

Programming Techniques Survey

Programming Techniques Survey

8th - 12th Grade

19 Qs

CPModule 3 Making Decisions

CPModule 3 Making Decisions

9th - 12th Grade

25 Qs

Python Quiz

Python Quiz

9th - 12th Grade

15 Qs

Code.org Unit 5 Lesson 15 Assessment

Code.org Unit 5 Lesson 15 Assessment

9th - 12th Grade

15 Qs

Subroutines

Subroutines

9th - 11th Grade

25 Qs

Python Variables Quiz

Python Variables Quiz

Assessment

Quiz

Computers

11th Grade

Hard

Created by

Rakesh Kumar

Used 1+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a variable in Python?

An ordered set of instructions

An identifier whose value can change

A fixed numeric value

A built-in function

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an invalid identifier name for a variable in Python?

total_Marks

_Percentage

1st_Room

marksMaths

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How are new variables created and assigned specific values in Python?

By using a define keyword

By using an assignment statement

By declaring them with a specific data type beforehand

Variables are automatically created when first mentioned

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if a variable is used in a Python program before it has been assigned a value?

It defaults to a value of 0.

It automatically assigns the value None.

The program skips the statement.

It leads to an error.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following types of values can a variable hold in Python?

Strings

Numbers

Alphanumeric combinations

All of the above

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the expression 10 + num, what does the + sign represent?

An operand

A variable

An operator

A constant

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the Python expression 13 // 5?

2.6

3

2

0

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?