Data types & variables

Data types & variables

University

5 Qs

quiz-placeholder

Similar activities

GEE-LIE-Intro to ICT

GEE-LIE-Intro to ICT

University

10 Qs

Animasi PAT

Animasi PAT

University

10 Qs

QIS CVML TEST1

QIS CVML TEST1

University

10 Qs

Chapter 5-1: Review Questions & Exercises

Chapter 5-1: Review Questions & Exercises

University

10 Qs

WAI-Kaggle-Quiz

WAI-Kaggle-Quiz

University

10 Qs

Kuiz Dashboard Komuniti

Kuiz Dashboard Komuniti

3rd Grade - University

10 Qs

PSP Week 5

PSP Week 5

University

10 Qs

pointers and structures

pointers and structures

University

10 Qs

Data types & variables

Data types & variables

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Julie Hartz

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

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?

Discover more resources for Computers