Search Header Logo

2.2.1a Variables & Types

Authored by Simon Graham

Computers

9th - 12th Grade

Used 8+ times

2.2.1a Variables & Types
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The correct way to write a variable in Python?

my_variable = 10
my variable = 10
my_variable is 10
my_variable: 10

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Data type for a whole number

String
Integer
Boolean
Float

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which instruction asks the user to enter something?

print()

int()

input()

def

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

what is the variable in the following script?

name

hello, your name is

print

There is no variable in this script

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which one of the following would show 'hello world' when the code was run?

print("hello world)
Print("hello world")
print("hello world")
print(hello world)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

How do you ask the user their favorite food and store this information in a variable?

favoriteFood = print("what is your favorite food?")
input()
favoriteFood = input("What is your favorite food?")
input = favoriteFood
favoriteFood = print("What is your favorite food?")
input = print("What is your favorite food?")
favoriteFood = input

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Variables cannot be changed when the program is running.

False

True

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?