Variables in Python

Variables in Python

8th Grade

8 Qs

quiz-placeholder

Similar activities

แบบทดสอบที่ 5 เรื่องการรับค่าในภาษาไพทอน (รายกลุ่ม)

แบบทดสอบที่ 5 เรื่องการรับค่าในภาษาไพทอน (รายกลุ่ม)

7th Grade - University

10 Qs

L1 Console, Variables and Creating a Program

L1 Console, Variables and Creating a Program

8th Grade

10 Qs

AstepI Quiz 2

AstepI Quiz 2

4th - 8th Grade

10 Qs

QuickCSharpCodeQuiz

QuickCSharpCodeQuiz

8th - 12th Grade

12 Qs

Delphi Arguments/Returns

Delphi Arguments/Returns

8th - 10th Grade

10 Qs

N5 SDD - Python input and output

N5 SDD - Python input and output

7th - 11th Grade

12 Qs

Python

Python

7th - 8th Grade

12 Qs

J277 - 10QQ - Basic Python 1

J277 - 10QQ - Basic Python 1

8th - 10th Grade

10 Qs

Variables in Python

Variables in Python

Assessment

Quiz

Computers

8th Grade

Medium

Created by

Mr. So

Used 325+ times

FREE Resource

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Look at the following code:

name = "John"

age = 23

What type of data is stored in the variable name?

str

int

float

nothing

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Look at the following code:

name = "John"

age = 23

What type of data is stored in the variable age?

str

int

float

nothing

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Look at the following code:

name = "John"

age = "23"

What type of data is stored in the variable age?

str

int

float

nothing

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If I want to store my height in a variable, which of the following would be a good variable name in best practice?

abcdefg

inches

number

height

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If I want to store my name in a variable, which of the following would be a good variable name in best practice?

name

teacher

mister

abcdef

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If I want to store multiple names in variables, which of the following would be good variable names in best practice?

a

b

c

name1

name2

name3

Audrey

Ben

John

blah1

blah2

blah3

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Look at the following code:

age = "23"

age = int(age)


What does the int() function do to the data in my variable?

does nothing

changes the string to a float

changes the number to a string

changes the string to an integer

8.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Look at the following code:

age = 23

age = float(age)


What does the float() function do to the data inside age?

changes the string to an int

changes the int to a string

adds a decimal point (23.0)

does nothing