Search Header Logo

PYTHON -- variables

Authored by Jami Campbell

Computers, Fun

9th - 12th Grade

Used 6+ times

PYTHON -- variables
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

12 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

30 sec • 5 pts

Variable names _____________.

Check all that apply.

must not begin with a number

can only contain the characters A-Z, a-z, 0-9, and _ .

letters must be lower case

letters can be upper case, but NOT at the beginning of the variable name

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Python, can string variables be declared using both single and double quotes?

Yes, they are interchangeable

No, only single quotes can be used

No, only double quotes can be used

No, strings cannot be declared with quotes

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Python, are variable names case-sensitive?

Yes, variable names are case-sensitive

No, variable names are not case-sensitive

Only the first character in the variable name is case-sensitive

Case sensitivity depends on the version of Python

4.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

In the following code, what value will be assigned to the variable "cat"?


mouse + cat + dog = "small" + "medium" + "large"

small, medium, large

small

medium

large

Nothing, that operation will throw an error

5.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

num = 90

num = 20

print(num)

90

4.5

20

1800

6.

MULTIPLE SELECT QUESTION

30 sec • 5 pts

Which of the following options are valid variable names?

Check all that apply.

1st_name

first_name

first Name

f1_name

firstName

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Variables are used _________.

to store data

to print data

to produce functions

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?