Search Header Logo

Python Basics Quiz - Variables Round 2

Authored by Angelito Villalon

Computers

9th - 12th Grade

Python Basics Quiz - Variables Round 2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you assign a value to a variable in Python?

x <- 1

x = 1

x == 1

x : 1

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid variable name in Python?

my-var

2myvar

_myvar

my var

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data type would be used to represent the value 2.2 in Python?

str

float

int

char

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you output the value of a variable in Python?

console.log(x)

print(x)

output(x)

echo(x)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a rule for creating variable names in Python?

Cannot contain spaces

Can start with a number

Case-sensitive

Can contain alpha-numeric characters and underscores

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of print(type(1))?

error

type1

type(1)

(type(1))

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a string in Python?

True

None

'Hello'

123

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?