Search Header Logo

Variables

Authored by Whizara Teacher

Computers

4th - 12th Grade

Used 25+ times

Variables
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Which one of the following is the correct way of declaring and initializing a variable, x with the value 7?

int x

x=7

int x=7

x=7

declare x=7

2.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

In Python, a variable may be assigned a value of one type, and then later assigned a value of a different type:

true

false

3.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

The following line of code is an example of:

print ("Distance hiked by Shannon is "+ str(S) + " miles" )

stringify

string conversion

concatenation

none of the above

4.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

In the following code, str(M) is an example of:

M = 30

print("Age of Leah's mom is " + str(M))

stringify

number conversion

type casting

none of the above

5.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What is the correct data type for the following

print(“My age is”)

integer

string

character

boolean

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?