Data types & variables

Data types & variables

University

5 Qs

quiz-placeholder

Similar activities

QUIZZ 1 : DATABASE FUNDAMENTALS

QUIZZ 1 : DATABASE FUNDAMENTALS

University

10 Qs

Q5 - ICT2

Q5 - ICT2

University

10 Qs

Software Engineering

Software Engineering

University

10 Qs

Planning and Implementation of Information Security

Planning and Implementation of Information Security

University

10 Qs

GET CONNECTED REDES E INTERNET

GET CONNECTED REDES E INTERNET

University

10 Qs

T02: Python - The Basics

T02: Python - The Basics

University

10 Qs

Clustering_Pertemuan2_Quiz_Ceria

Clustering_Pertemuan2_Quiz_Ceria

University

10 Qs

Let's Play Together

Let's Play Together

University - Professional Development

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