What will be the output of the following code?
# This is a comment
#print("Hello, World!")
Python Basics Quiz
Quiz
•
Instructional Technology
•
5th - 10th Grade
•
Hard
Klea h
FREE Resource
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
What will be the output of the following code?
# This is a comment
#print("Hello, World!")
This is a comment
Hello, World!
# This is a comment
Hello, World!
No output
Error
2.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
Which of the following is the correct way to write a multiline comment in Python?
/* This is a comment */
// This is a comment
# This is a comment
"""This is a comment"""
3.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
What is the data type of the user input in the code below?
x = input("Enter a number: ")
int
float
str
bool
4.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
Which line correctly converts the input to an integer?
x = str(input())
x = float(input())
x = int(input())
x = input(int())
5.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
What will be the result of the following code?
x = 5 y = "3" print(x + int(y))
8
53
Error
5 + "3"
6.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
Which of the following is a valid variable?
2name = "John"
full-name = "John"
running_total = 123
my class = 123
7.
FILL IN THE BLANK QUESTION
1 min • 2 pts
Complete the code to print: My name is Ben and I am 13 years old.?
name = "Ben"
age = 13
print(________________)
35 questions
Computers and Peripherals
Quiz
•
6th - 8th Grade
25 questions
information and communication technology
Quiz
•
7th - 9th Grade
25 questions
ISOM-PRELIMS
Quiz
•
5th Grade
25 questions
Quizz PHP dasar Kelas 11 PPLG 1
Quiz
•
1st - 5th Grade
25 questions
Coding DA
Quiz
•
6th - 8th Grade
33 questions
Arduino Basics
Quiz
•
8th Grade
30 questions
Mengenal Excel
Quiz
•
7th Grade
25 questions
Microsoft Excel 2016
Quiz
•
7th - 8th Grade
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
20 questions
Final Exam Vocabulary
Quiz
•
6th Grade