CSE_CodeHS_intro_python_unit_3_5

CSE_CodeHS_intro_python_unit_3_5

9th - 12th Grade

15 Qs

quiz-placeholder

Similar activities

SLR 9 - Advanced Programming Techniques - Part Two

SLR 9 - Advanced Programming Techniques - Part Two

10th Grade

10 Qs

Arrays

Arrays

11th Grade

10 Qs

Unit 5 TEST

Unit 5 TEST

11th - 12th Grade

20 Qs

Python (The Basics)

Python (The Basics)

6th - 10th Grade

20 Qs

Arrays

Arrays

10th - 12th Grade

10 Qs

APCSP CodeHS Unit 3

APCSP CodeHS Unit 3

10th - 12th Grade

20 Qs

19W Final Exam - PLTW

19W Final Exam - PLTW

9th - 12th Grade

15 Qs

Python Basics (CodeHS)

Python Basics (CodeHS)

7th - 12th 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?