Lego Spike & Python - Challenge 3 Quiz

Lego Spike & Python - Challenge 3 Quiz

6th - 8th Grade

10 Qs

quiz-placeholder

Similar activities

Quiz Software

Quiz Software

8th Grade - University

15 Qs

Python Junior

Python Junior

6th - 8th Grade

12 Qs

Python հարցեր 7-րդ դաս

Python հարցեր 7-րդ դաս

7th Grade

14 Qs

Вікторина "БАЗОВІ ЗНАННЯ"

Вікторина "БАЗОВІ ЗНАННЯ"

7th Grade

10 Qs

LOOPS AND FLOW CONTROL STATEMENTS

LOOPS AND FLOW CONTROL STATEMENTS

8th Grade

10 Qs

Codecombat

Codecombat

6th Grade

15 Qs

Python: тест #1

Python: тест #1

1st Grade - University

11 Qs

Daniel Popel

Daniel Popel

8th Grade

7 Qs

Lego Spike & Python - Challenge 3 Quiz

Lego Spike & Python - Challenge 3 Quiz

Assessment

Quiz

Information Technology (IT)

6th - 8th Grade

Hard

Created by

JML- TARQUINO

Used 11+ times

FREE Resource

AI

Enhance your content in a minute

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

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 5 pts

Media Image

What is the output of the code shown?

"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

Media Image

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

Media Image

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

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?