CSE_CodeHS_intro_python_unit_3_5

CSE_CodeHS_intro_python_unit_3_5

9th - 12th Grade

15 Qs

quiz-placeholder

Similar activities

Python Циклы и Условные операторы.

Python Циклы и Условные операторы.

6th - 11th Grade

13 Qs

AIB_2Q

AIB_2Q

12th Grade

20 Qs

CodeHS - Intro to Python - Basics and Console Interaction

CodeHS - Intro to Python - Basics and Console Interaction

9th Grade - Professional Development

20 Qs

Variables

Variables

7th - 10th Grade

16 Qs

Python - тест

Python - тест

1st - 12th Grade

15 Qs

Python - Iteration (For Loops)

Python - Iteration (For Loops)

10th Grade

20 Qs

Arrays in Java

Arrays in Java

9th - 12th Grade

20 Qs

Python Unit 3 Review

Python Unit 3 Review

9th Grade

20 Qs

CSE_CodeHS_intro_python_unit_3_5

CSE_CodeHS_intro_python_unit_3_5

Assessment

Quiz

Computers

9th - 12th Grade

Hard

Created by

Omer Yazici

Used 6+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Question: 1

What is the final result of the expression 4 + 5 * 3?

27

12

21

19

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Choose the print statement below that will cause an error.
Assume that num has the value 6, and name has the value Isabella.

  1. print(name + ":" )
    print(num)

  1. print(name + " wants " + "num " + "candies")

  1. print(name + ": " + str(num))

  1. print(name + ": " + num)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which one of the statements below will cause an error?

  1. ans = “hi” * 8

  1. ans = “hi” + 9

  1. ans = “hi” + “hi” + “hi”

  1. ans = (“a” * 4) + “b”

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following program print?

a = "hi"
b = 4
c = a * b
print(type(c))

  1. <class 'str'>

  1. <class 'int'>

  1. <class 'float'>

  1. The program crashes and doesn’t print anything.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Suppose you have a variable defined a = "4". What is the variable type of a?

  1. str

  1. int

  1. float

  1. number

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. What does the following code print?

    x = 3.4
    y = 1
    print(int(x))
    print(x + y)

  1. 3.4
    4.4

  1. 3
    4.4

  1. 3
    4

  1. The code causes an error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements is true about print statements?

I. In order to print a string literal, the string must be enclosed in quotes.
II. Each print statement will be printed on its own line.
III. Print statements will not let you print string and number characters in the same statement.
IV. Print statements are how you display text on the screen.

  1. I, IV

  1. II, III

  1. I, II, IV

  1. I, III, IV

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?