
Discovery Python

Quiz
•
Computers
•
University
•
Medium

Ayman Marzouk
Used 3+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following shell command do?
echo 'print("Hello, World!")'
Executes the Python script hello_world.py.
Saves the text print("Hello, World!") to a file.
Prints the text print("Hello, World!") in the terminal.
Converts the text to uppercase.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will this Python script print?
age = 25
print(f"In 42 years, you will be {age + 42}")
In 42 years, you will be 42
In 42 years, you will be 67
In 42 years, you will be 25
Throws a syntax error.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following Python snippet do?
number = float(input("Enter a number: "))
if number == 0:
print("The number is zero.")
else:
print("The number is non-zero.")
Always prints "The number is zero."
Always prints "The number is non-zero."
Checks if the input is zero or non-zero and prints the respective message.
Raises an error if the input is not a valid number.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of this Python code?
word = "Python"
print(word.upper())
PYTHON
python
Throws an error.
Python
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will this Python code output?
number = 5
while number < 10:
print(number)
number += 2
5 7 9
5 6 7 8 9
5 7 9 11
Infinite loop.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does this Python snippet do?
password = "letmein"
entered_password = input("Enter your password: ")
if entered_password == password:
print("Access Granted")
else:
print("Access Denied")
Compares the entered password with password and prints the respective message.
Throws an error because input is not defined.
Always prints "Access Granted."
Always prints "Access Denied."
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
ASK F2 -KOD ARAHAN (PYTHON)

Quiz
•
1st Grade - University
15 questions
Python-loops, branches, functions

Quiz
•
University
10 questions
Intro-Computacao_3.2

Quiz
•
University
10 questions
T02: Python - The Basics

Quiz
•
University
10 questions
Diagnóstico python

Quiz
•
University
10 questions
Python-1st

Quiz
•
University
10 questions
Avaliação Pensamento Computacional - Prático

Quiz
•
1st Grade - Professio...
15 questions
Round 4 - Harvest

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University