
Discovery Python
Authored by Ayman Marzouk
Computers
University
Used 6+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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."
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Understanding Email, Contacts and Calendaring
Quiz
•
University
12 questions
Python Quiz 1.4
Quiz
•
University
10 questions
CodeMonkey for B.Ed IT
Quiz
•
University
13 questions
Processing Quiz
Quiz
•
University
10 questions
Quiz 1
Quiz
•
University
10 questions
Amazon Aptitude Quiz-SK-1
Quiz
•
University
15 questions
COMPUTER NETWORK & SECURITY (QUIZ #4) MIDTERM 2024
Quiz
•
University
10 questions
Flutter Quiz
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade