Python Part 1

Python Part 1

8th Grade

15 Qs

quiz-placeholder

Similar activities

Python Basic

Python Basic

6th - 8th Grade

10 Qs

Python Casting and Input

Python Casting and Input

8th - 11th Grade

15 Qs

Programming - What Do I Know?

Programming - What Do I Know?

7th - 9th Grade

15 Qs

Python Revision

Python Revision

8th Grade

16 Qs

Introduction to Python Quiz

Introduction to Python Quiz

8th Grade - University

10 Qs

Python - Variables and Input

Python - Variables and Input

1st - 10th Grade

16 Qs

Year 8 Spring 1 Assessment

Year 8 Spring 1 Assessment

7th - 8th Grade

18 Qs

N5 SDD - Python input and output

N5 SDD - Python input and output

7th - 11th Grade

12 Qs

Python Part 1

Python Part 1

Assessment

Quiz

Computers

8th Grade

Hard

Created by

Thomas Reynolds

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What does the print("Hello") command do?
Displays the text "Hello" on the screen
Stores the text "Hello" in a variable
Takes input from the user
Adds a comment to the code

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the purpose of # in Python?
To add a comment that the computer ignores
To create a variable
To start a function
To repeat code

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following is a valid way to create a variable with a string?
name = "Alice"
"Alice" = name
name == "Alice"
input(name = "Alice")

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the correct way to ask a user for their name?
name = input("What is your name?")
name = print("What is your name?")
input("What is your name?") = name
name == input("What is your name?")

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What does this f-string do? print(f"Hello, {name}!")
Combines the word "Hello" with the value of name
Declares a new variable
Asks for input from the user
Adds a comment

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the correct way to convert input into an integer?
age = int(input("Enter your age: "))
int = input("Enter your age")
input(int("Enter your age: "))
age = input(int("Enter your age: "))

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following data types can hold decimal numbers?
float
int
str
bool

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?