Unit 1 Post Test: Basic Python

Quiz
•
Computers
•
9th - 12th Grade
•
Hard
Daniel Clark
Used 9+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following is the correct syntax to display "Hello, World!" in Python?
print("Hello World!")
console.log("Hello, World!")
print("Hello, World!")
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the correct way to create a variable in Python and assign the value 10 to it?
int x = 10
var x = 10
num = 10
x := 10
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following code?
print(4 + 5 * 2)
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following is an example of type conversion in Python?
x = str(5)
x = int("5")
x = float("3.14")
All of the above
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What does the following code output?
name = "John"
age = 25
print("My name is " + name + " and I am " + str(age) + " years old.")
My name is John and I am 25 years old.
My name is John and I am age 25.
My name is name and I am age 25 years old.
Error
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will the following code output if the user inputs "5"?
<class 'int'>
<class 'str'>
<class 'float'>
Error
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following is the correct way to get user input in Python and store it as an integer?
user_input = int(input("Enter a number: "))
user_input = input("Enter a number: ")
user_input = float(input("Enter a number: "))
user_input = eval(input("Enter a number: "))
Create a free account and access millions of resources
Similar Resources on Wayground
13 questions
Y9 Homework 1: Python Revisited 1

Quiz
•
9th Grade
10 questions
Python- Operators

Quiz
•
12th Grade
12 questions
Թեմատիկ-9-2 Python

Quiz
•
12th Grade
15 questions
Ôn tập Thi HK1

Quiz
•
10th Grade
15 questions
Kiểm tra thường xuyên 3 HK1

Quiz
•
10th Grade
10 questions
Introducción a Python A3

Quiz
•
10th Grade
13 questions
Fundamentos de Python

Quiz
•
10th Grade
10 questions
THỰC HÀNH SỐ 1

Quiz
•
12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
Proper Keyboarding Techniques

Interactive video
•
6th - 10th Grade
14 questions
Inputs and Outputs: Computer Science Intro

Lesson
•
5th - 9th Grade
10 questions
Understanding Computers: Hardware, Software, and Operating Systems

Interactive video
•
7th - 12th Grade
29 questions
AP CSP Unit 2 Review (Code.org)

Quiz
•
10th - 12th Grade