Search Header Logo

G8 Python Programming Quiz

Authored by Kiers McFarlane

Computers

8th Grade

Used 10+ times

G8 Python Programming Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

40 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of `print("3" + str(4))`?

7

"34"

"7"

Error

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why is `print("Age is", age)` better than `print("Age is" + age)` if age = 12?

It saves memory

It avoids a type error by using comma separation

It removes the need for quotation marks

It converts age to float

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does `print("Hi".lower().count("h"))` return?

1

0

2

Error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If `msg = "hi there"`, what does `msg.find("e")` return?

6

7

True

"e"

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main difference between `input("Age: ")` and `int(input("Age: "))`?

The second one saves more memory

The second converts the string to an integer

The first checks type

The second is only used for decimals

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In `user_age = input("Enter age: ") + 1`, what kind of error occurs?

SyntaxError

TypeError

IndexError

RuntimeError

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will `x = input("Enter number: "); print(type(x))` show if the user enters 8?

int

float

str

bool

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?