CSE_CodeHS_intro_python_unit_3_5

CSE_CodeHS_intro_python_unit_3_5

9th - 12th Grade

15 Qs

quiz-placeholder

Similar activities

IDT Unit 2 Review (practice for Test 2)

IDT Unit 2 Review (practice for Test 2)

8th - 12th Grade

20 Qs

XII_CS_FUNCTIONS

XII_CS_FUNCTIONS

12th Grade

15 Qs

Arrays and Algorithms

Arrays and Algorithms

10th - 12th Grade

15 Qs

Area With Arrays

Area With Arrays

10th - 12th Grade

15 Qs

CodeHS Python Unit 3 Quiz Review

CodeHS Python Unit 3 Quiz Review

9th - 12th Grade

20 Qs

PHP - Quiz#1

PHP - Quiz#1

12th Grade

15 Qs

Python Lesson 3

Python Lesson 3

8th - 11th Grade

18 Qs

CodeHS Python Unit 5 Review

CodeHS Python Unit 5 Review

9th - 12th Grade

15 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?