What is the output of the code shown?
Lego Spike & Python - Challenge 3 Quiz

Quiz
•
Information Technology (IT)
•
6th - 8th Grade
•
Hard
JML- TARQUINO
Used 11+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 5 pts
"5.0"
7.0
7
TypeError
Answer explanation
In Python, when an arithmetic operator has operands of different numeric types, such as int and float, the integer operand is widened to a floating point type to perform the operation.
Therefore, the result of an operation between int and float is always float.
2.
MULTIPLE CHOICE QUESTION
1 min • 5 pts
In the code shown, what type of data is the result?
int
str
float
bool
Answer explanation
In Python, when an arithmetic operator has operands of different numeric types, such as int and float, the integer operand is widened to a floating point type to perform the operation.
Therefore, the result of an operation between int and float is always float.
3.
MULTIPLE CHOICE QUESTION
1 min • 5 pts
Which of the following statements correctly declares or initializes a variable in Python?
int a = 10
a: int = 10
var a = 10
a = 10
4.
MULTIPLE CHOICE QUESTION
1 min • 5 pts
What will be the output of the code shown?
3.33
3
4.5
10.3
Answer explanation
In Python, the integer division (also referred as floor division), consists in discarding the fractional part (or decimals) of the quotient.
So the result, is rounded to the nearest whole number. In this case, 10 // 3 = 3.
5.
MULTIPLE CHOICE QUESTION
1 min • 5 pts
In Python, Which is the basic data type for numbers with decimals or fractional parts?
float
bool
str
int
6.
MULTIPLE CHOICE QUESTION
1 min • 5 pts
In Python, Which is the basic data type for numbers without decimals or fractional parts?
float
bool
str
int
7.
MULTIPLE CHOICE QUESTION
1 min • 5 pts
In Python, Which is the basic data type for letters, words, sentences or paragraphs?
float
bool
str
int
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
Викторина по основам Python

Quiz
•
8th Grade
15 questions
Variables, tipos de datos y operadores

Quiz
•
8th Grade
5 questions
операторларды тап

Quiz
•
6th Grade
8 questions
Типы данных в Python

Quiz
•
6th Grade
10 questions
Основи Python

Quiz
•
7th Grade
9 questions

Quiz
•
8th Grade
10 questions
Arrays in CQuiz

Quiz
•
1st Grade - University
15 questions
Python Data Structures

Quiz
•
6th - 8th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Information Technology (IT)
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
20 questions
Final Exam Vocabulary

Quiz
•
6th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
11 questions
Decimal/fraction conversions quick check

Quiz
•
5th - 7th Grade
10 questions
Identifying equations

Quiz
•
KG - University
44 questions
El fin del año- 7th

Quiz
•
7th - 12th Grade
40 questions
Word Study Assessment: Roots, Prefixes, Suffixes, and Vocabulary

Quiz
•
8th Grade
49 questions
How Well Do You Know Your 6th Grade Teachers?

Quiz
•
6th Grade