KP2-Variables

KP2-Variables

2nd Grade

36 Qs

quiz-placeholder

Similar activities

Night of the New Magicians  (MTH#35)

Night of the New Magicians (MTH#35)

1st - 5th Grade

39 Qs

kwan's second grade

kwan's second grade

2nd Grade

34 Qs

National Artist Award Quiz

National Artist Award Quiz

2nd Grade

40 Qs

Incredible India

Incredible India

2nd - 4th Grade

40 Qs

3rd Enrichment Art Quiz

3rd Enrichment Art Quiz

1st - 5th Grade

32 Qs

Art Assessment 3

Art Assessment 3

2nd Grade

34 Qs

Fun Time

Fun Time

2nd Grade

41 Qs

G2- MAPEH (3RD QUARTER)

G2- MAPEH (3RD QUARTER)

2nd Grade

40 Qs

KP2-Variables

KP2-Variables

Assessment

Quiz

Arts

2nd Grade

Medium

Created by

MrsT Voci

Used 1+ times

FREE Resource

AI

Enhance your content

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

36 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

What is the output of the following code?

x = 10

y = 10

z = 0

z = x - y

print(z)

0

20

10

None of these

2.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

What is the output of the following code?

x, y = 10, 20

min = x if x < y else y

print(min)

10

None of these

20

invalid syntax

3.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

What is the output of the following code?

x = 10

a = 0

print(x > a)

False

True

10

None of these

4.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Which of the following casts could result in a run time error?

A string cast as an int

An integer cast as a string

An int cast as a float

A float cast as a string

5.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

What is the value of the variable 'c' in the following code snippet?

a = 3

b = 2

c = a ** b

0

6

False

9

6.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

You are coding a tip calculator. The user must enter a price. Select the line of code that will make your program work whether the user enters whole numbers or decimals (for example, 30.99).

# enter code here

tip_rate = .15

tip = price * tip_rate

total_price = price + tip

price = input(“Enter the price”)

price = int(input(“Enter the price”))

price = float(input(“Enter the price”))

price = flt(input(“Enter the price”))

7.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

What is the purpose of the following code

try:

a = int(b)

except:

print('Error')

None of these

Invalid syntax

Trap an invalid integer value

Convert b to a string

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?