Basic Python and Console Interaction Review

Basic Python and Console Interaction Review

12th Grade

20 Qs

quiz-placeholder

Similar activities

GCSE Computer Science - Programming Keywords

GCSE Computer Science - Programming Keywords

9th - 12th Grade

15 Qs

CodeHS Python Unit 3 Quiz Review

CodeHS Python Unit 3 Quiz Review

9th - 12th Grade

20 Qs

Python_2R

Python_2R

KG - Professional Development

20 Qs

APCSP CodeHS Unit 3

APCSP CodeHS Unit 3

10th - 12th Grade

20 Qs

Python Functions

Python Functions

12th Grade

15 Qs

Python Basics-02

Python Basics-02

9th - 12th Grade

21 Qs

IST P-STEM Unit 1 Hardware and Python Review

IST P-STEM Unit 1 Hardware and Python Review

8th - 12th Grade

20 Qs

Basic Python and Console Interaction Review

Basic Python and Console Interaction Review

Assessment

Quiz

Computers

12th Grade

Easy

Created by

Henry Vo

Used 9+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

27

12

21

19

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the final result of the expression 7 / 2 + 6?

0

9.5

9

0.875

3.

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.

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

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

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

print(name + ": " + num)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which one of the statements below will cause an error?

ans = “hi” * 8

ans = “hi” + 9

ans = “hi” + “hi” + “hi”

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

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following program print?

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

<type 'str'>

<type 'int'>

<type 'float'>

The program crashes and doesn’t print anything.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

str

int

float

number

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Choose the option that correctly prints out the variable(s).

x = "codehs"
print(int(x))

num = 8
print("num")

name = "Alyx"
age = 32
print(name + "is " + age)

language = "Python"
print("I'm learning " + language)

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?