
Revision and Extended Learning for Lab 1

Quiz
•
Computers
•
University
•
Medium
Careene McCallum
Used 2+ times
FREE Resource
26 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What TYPE of value is stored in the variable num?
Integer
Float
String
Boolean
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the value of ans if num is 12?
4.0
4
4.33
TypeError: unsupported operand type(s) for /: 'str' and 'int'
3.
MULTIPLE SELECT QUESTION
1 min • 1 pt
What correction should be made to line 2 to ensure proper execution? NB: There are TWO possible answers.
ans = float(num) /3
ans = num(float) / 3
ans = f"{float(num) / 3}"
ans = f"(float(num) / 3)"
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What value is printed if the user enters 12?
TypeError: unsupported operand type(s) for /: 'str' and 'int'
4.33
4
4.0
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the data type of formatted_num?
str
int
float
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the data type for formatted_num?
str
int
float
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the purpose of :d in the f-string?
It ensures that the variable num_items is treated as an integer when formatting the output.
It formats the number as a string.
Create a free account and access millions of resources
Similar Resources on Wayground
25 questions
Assignment 2(CIVIL)

Quiz
•
University
25 questions
Python Programming Basics 1

Quiz
•
University
23 questions
Beginning C Programming

Quiz
•
University
25 questions
python_quiz

Quiz
•
University
25 questions
Quiz 2

Quiz
•
University
23 questions
PYTHON - 14.07.2023

Quiz
•
University
22 questions
CS0012 Spring 25 Midterm Review

Quiz
•
University
25 questions
TECH_IQ_HUNT ROUND

Quiz
•
University
Popular Resources on Wayground
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
10 questions
Afterschool Activities & Sports

Quiz
•
6th - 8th Grade
15 questions
PRIDE

Quiz
•
6th - 8th Grade
15 questions
Cool Tool:Chromebook

Quiz
•
6th - 8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
20 questions
Bullying

Quiz
•
7th Grade
18 questions
7SS - 30a - Budgeting

Quiz
•
6th - 8th Grade
Discover more resources for Computers
36 questions
USCB Policies and Procedures

Quiz
•
University
4 questions
Benefits of Saving

Quiz
•
5th Grade - University
20 questions
Disney Trivia

Quiz
•
University
2 questions
Pronouncing Names Correctly

Quiz
•
University
15 questions
Parts of Speech

Quiz
•
1st Grade - University
1 questions
Savings Questionnaire

Quiz
•
6th Grade - Professio...
26 questions
Parent Functions

Quiz
•
9th Grade - University
18 questions
Parent Functions

Quiz
•
9th Grade - University