Data types & variables

Data types & variables

University

5 Qs

quiz-placeholder

Similar activities

Tanda2_FUNPRO_Normal

Tanda2_FUNPRO_Normal

University

10 Qs

shuckluckmumppump

shuckluckmumppump

University

10 Qs

Do you know alot about Roblox?

Do you know alot about Roblox?

2nd Grade - University

10 Qs

Recap - Macs & PCs

Recap - Macs & PCs

University

10 Qs

Soal Web Development

Soal Web Development

University

10 Qs

 SIMULADOR 4 - D.LNº 1267 - LEY DE LA POLICÍA NACIONAL DEL PERÚ

SIMULADOR 4 - D.LNº 1267 - LEY DE LA POLICÍA NACIONAL DEL PERÚ

University

10 Qs

Firewall e IDS - Segurança de Redes

Firewall e IDS - Segurança de Redes

University

10 Qs

Breylon's quiz

Breylon's quiz

5th Grade - Professional Development

10 Qs

Data types & variables

Data types & variables

Assessment

Quiz

Computers

University

Hard

Created by

Julie Hartz

FREE Resource

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the type of

"3.14" ?

Boolean

String

Float

Integer

Answer explanation

Because of the dble quotes, it's a STRING.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

n_students = 250

How would you check the type of n_students?

which(n_students)

data(n_students)

type(n_students)

typeof(n_students)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following:

6.26 > 5

True

False

Error

Answer explanation

You can compare floats to integers, so the answer would be a boolean with the value True

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How would you create a new variable called my_university?

my_university = McMaster

my_university ==

"McMaster"

my_university is "McMaster"

my_university = "McMaster"

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Correct the code below:

my_age = 29

"I am my_age years old"

"I am " + my_age + " years old"

"I am {my_age} years old"

f"I am {my_age} years old"

Answer explanation

my_age is an INTEGER so you need to use a formatted STRING f"... { } ..." to include my_age in your string