
Python Code Output Quiz
Authored by Yasmeen Kanwal
Computers
5th Grade
Used 4+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
18 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? def calculate (num1, num2=4): res = num1 * num2 print(res) calculate(5, 6) Hint: functions in Python
20
The program executed with errors
30
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Can we use the “else” block for for loop? for example: for i in range(1, 5): print(i) else: print("this is else block statement" )
No
Yes
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following x = 36 / 4 * (3 + 2) * 4 + 2 print(x) Hint: Python Operators Precedence
182.0
37
117
The Program executed with errors
4.
OPEN ENDED QUESTION
3 mins • 1 pt
Which operator has higher precedence in the following list % (Modulus) & (BitWise AND) ** (Exponent) > (Comparison)
Evaluate responses using AI:
OFF
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The in operator is used to check if a value exists within an iterable object container such as a list. Evaluate to True if it finds a variable in the specified sequence and False otherwise.
True
False
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? var = "James" * 2 * 3 print(var)
JamesJamesJamesJamesJamesJames
JamesJamesJamesJamesJames
Error: invalid syntax
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? str = "pynative" print (str[1:3])
py
yn
pyn
yna
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
14 questions
กว่าจะมาเป็นคอมพิวเตอร์
Quiz
•
5th - 6th Grade
20 questions
Year 7 - The Internet
Quiz
•
5th - 7th Grade
13 questions
Guess the Retro Computer 1
Quiz
•
KG - Professional Dev...
16 questions
Internet Firsts
Quiz
•
5th - 12th Grade
20 questions
Application and System Software
Quiz
•
5th - 12th Grade
13 questions
Video games
Quiz
•
1st - 9th Grade
15 questions
COMPUTER - G5
Quiz
•
5th Grade
15 questions
Excel
Quiz
•
5th - 6th Grade
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