Search Header Logo

Python Basics Quiz for Students

Authored by Christopher Cook

Computers

Professional Development

Used 1+ times

Python Basics Quiz for Students
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the `input()` function in Python do?

Outputs text to the screen

Allows the user to input data

Stores variables in memory

None of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? ```python name = "Alice" print("Hello", name) ```

Hello

name

Hello Alice

None of the above

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if you change the variable name to `word` in a program?

Works the same with a different variable name

Produces an error

The variable won't store any data

None of the above

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will happen if you put quotes around the variable name in a `print()` statement?

Produces an error

Prints the variable name literally

Prints the variable value

None of the above

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following code snippet do? ```python name = input("Enter your name: ") print("Hello", name) ```

Prints "Hello name"

Outputs an error

Greets the user with their entered name

None of the above

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What type of data does `input()` return in Python?

Integer

Float

String

Boolean

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why is it necessary to use descriptive variable names?

To make the program look professional

To avoid syntax errors

To make the code easier to read

To save memory

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?