Python Basics Quiz for Students

Python Basics Quiz for Students

Professional Development

15 Qs

quiz-placeholder

Similar activities

Pyflask2020

Pyflask2020

KG - Professional Development

10 Qs

Quiz Python 'Operadores y String'

Quiz Python 'Operadores y String'

Professional Development

20 Qs

Coding - Intermediate Level

Coding - Intermediate Level

4th Grade - Professional Development

18 Qs

CodeTigers Python 101

CodeTigers Python 101

KG - Professional Development

10 Qs

Basics of programming - Quiz - 01

Basics of programming - Quiz - 01

University - Professional Development

20 Qs

Python Training Day-2  Quiz-2

Python Training Day-2 Quiz-2

Professional Development

10 Qs

Scope of Variables in Python

Scope of Variables in Python

1st Grade - Professional Development

15 Qs

Day 3

Day 3

Professional Development

10 Qs

Python Basics Quiz for Students

Python Basics Quiz for Students

Assessment

Quiz

Computers

Professional Development

Hard

Created by

Christopher Cook

Used 1+ times

FREE Resource

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

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?