Search Header Logo
Python Introduction-2-26-2025

Python Introduction-2-26-2025

Assessment

Presentation

Computers

KG

Hard

Created by

Steven Howard

FREE Resource

19 Slides • 16 Questions

1

media

2

media

3

media

4

Multiple Choice

What does the term 'debug' mean?
1
Identify errors and fix them.
2
Making a calculation
3
A set of instructions
4
Looking at code

5

​Example of Python Syntax:

​print(" Welcome to Computer Science! ")

​Step 1: Type the keyword print

​Step 2: ( ) Add parenthesis

​Step 3: (" ") Add quotation marks inside the parenthesis

​Step 4: (" Welcome to Computer Science ") Type Welcome to Computer Science in between the parenthesis.

6

​What is Syntax?

​- the set of rules that defines the combinations of symbols that are considered to be correctly structured statements or expressions in that language.

media

7

Multiple Choice

What is syntax?
1
Syntax is the word used to describe an error
2
Syntax is the rules of the programming language
3
It is used to read information
4
It is used to output information 

8

Multiple Choice

What Python command lets the user enter an answer to a question?
1
answer()
2
open()
3
print()
4
input()

9

Multiple Choice

Improper indentation is an example of what type of error?

1

Syntax Error

2

Run-time Error

3

Semantic Error

10

Multiple Choice

An infinite loop is an example of what type of error?

1

Syntax Error

2

Run-time Error

3

Semantic Error

11

Multiple Choice

The wrong use of PEMDAS is an example of what type of error?

1

Syntax Error

2

Run-time Error

3

Semantic Error

12

Multiple Choice

The following is an example of what type of error?


print("Here is some text")

print(1/0)

1

Syntax Error

2

Run-time Error

3

Semantic Error

13

Multiple Choice

The following is an example of what type of error?


print("Here is some text"

print(6/2)

1

Syntax Error

2

Run-time Error

3

Semantic Error

14

Multiple Choice

The following is an example of what type of error?


print(Here is some text")

print(2/2)

1

Syntax Error

2

Run-time Error

3

Semantic Error

15

Multiple Choice

The following code to calculate an average is an example of what type of error?


x = 2

y = 6

average = x + y / 2

print(average)

1

Syntax Error

2

Run-time Error

3

Semantic Error

16

media

17

Strings (str)

  • Lets the user type in letters, numbers and words

  • Not used for calculations

  • When doing calculations: be sure to check that your value is a number, not a string

  • Always surrounded in quotation marks

18

What are Variables?

  • A name for a spot in the computer’s memory

  • This value can change while the program runs

  • Different types of data take up different amounts of space in memory

19

Multiple Select

Select all strings:

1

greeting = (Hello)

2

greeting = ("Please enter your name")

3

greeting = (Welcome to Comp Sci)

4

greeting = ("Happy Friday!!!")

20

Multiple Select

Please select all floating point numbers:

1

1.444

2

34567

3

777.980

4

32.0

5

21

21

​Boolean Values:

​- In programming you often need to know if an expression is True or False.

-You can evaluate any expression in Python, and get one of two answers, True or False.

-When you compare two values, the expression is evaluated and Python returns the Boolean answer:

print(10 > 9)

print(10 == 9)

print(10 < 9)

22

Multiple Choice

runs code line by line and checks for errors
1
interpreter
2
variable
3
modulo
4
boolean

23

Multiple Choice

stores a piece of data, and gives it a specific name
1
variable
2
whitespace
3
interpreter
4
modulo

24

Multiple Choice

What is the stat type returned for this line of code: type(0.6)

1

Boolean

2

string

3

integer

4

float

25

Multiple Choice

What is the output for this line of code: print(type('I love Quizizz!"))

1

<class 'bool'>

2

<class 'str'>

3

<class 'int'>

4

error

26

media

27

media

28

media

29

media

30

media

31

media

32

media

33

media

34

media

35

media
media

Show answer

Auto Play

Slide 1 / 35

SLIDE