Data types & variables
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
Julie Hartz
FREE Resource
Enhance your content in a minute
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

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Quizz3 Ciencia de Datos
Quiz
•
University
10 questions
W5- 11/04
Quiz
•
University
10 questions
Analysis of Algorithms
Quiz
•
University
10 questions
python quiz
Quiz
•
6th Grade - Professio...
10 questions
Test JavaScript
Quiz
•
University
10 questions
FOP - CHAPTER 6
Quiz
•
University
10 questions
Scrum
Quiz
•
University
10 questions
DAA Quiz 1
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
