
python exam
Authored by Mohamed Abowarda
Education
8th Grade
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
5 mins • 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
Answer explanation
Remember, the range doesn’t include the stop number in the output. Read Python range function for more details.
2.
MULTIPLE CHOICE QUESTION
5 mins • 2 pts
What is the output of the following code?
10, 11, 12, 13, 14
10, 11, 12, 13, 14, 15
Answer explanation
Remember, the range doesn’t include the stop number in the output. Read Python range function for more details.
3.
MULTIPLE CHOICE QUESTION
5 mins • 2 pts
What is the output of the following code?
{‘Vicki’, ‘Jodi’, ‘Garry’, ‘Eric’}
{‘Jodi’, ‘Vicki’, ‘Garry’, ‘Eric’}
The program executed with error
Answer explanation
The set is an unordered data structure. Therefore, we cannot access/add/remove its elements by index number.
4.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What is the output of the following code?
10 20
10 20 30
Error: invalid syntax
Answer explanation
In Python, We can do simultaneous assignments to more than one variable.
5.
MULTIPLE CHOICE QUESTION
5 mins • 3 pts
What is the output of the following code?
JamesJamesJamesJamesJamesJames
JamesJamesJamesJamesJames
Error: invalid syntax
Answer explanation
We can use * operator to repeat the string n number of times. For example, in the above question, First, we repeated the string two times, and again we repeated the output string three times.
6.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
A string is immutable in Python?
Every time when we modify the string, Python Always create a new String and assign a new string to that variable.
TRUE
FALSE
Answer explanation
Yes, strings are immutable in Python. You cannot modify a string once created. If you change a string, Python builds a new string with the updated value and assigns it to the variable.
7.
MULTIPLE CHOICE QUESTION
5 mins • 2 pts
What is the output of the following code?
10
15
25
125
Answer explanation
Using two multiplication symbols, we can make a power relationship in Python. We call operator an exponent operator. For example, the result of expression 5 3 is 125
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
Gandhiji in Nabinagar
Quiz
•
4th - 9th Grade
12 questions
Konark Sun Temple
Quiz
•
6th - 12th Grade
15 questions
Algorithms
Quiz
•
7th - 10th Grade
14 questions
INFINITIVE\GERUND
Quiz
•
8th Grade
10 questions
Shape
Quiz
•
4th - 8th Grade
17 questions
Planets
Quiz
•
6th - 8th Grade
15 questions
A night out
Quiz
•
8th Grade
15 questions
Indonesian Nouns and Numbers
Quiz
•
7th - 9th 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
Discover more resources for Education
5 questions
Legends, Leaders, & Changemakers: Maya Angelou
Interactive video
•
6th - 8th Grade
10 questions
Understanding Poetry and Literary Devices
Interactive video
•
4th - 8th Grade
15 questions
Product of Powers Property A1 U7
Quiz
•
8th Grade
10 questions
Understanding Meiosis
Interactive video
•
6th - 10th Grade
20 questions
Laws of Exponents
Quiz
•
8th Grade
16 questions
8th U5L5 Graphs of Functions
Quiz
•
8th Grade
20 questions
Graphing Inequalities on a Number Line
Quiz
•
6th - 9th Grade
15 questions
Main Idea and Supporting Details.
Quiz
•
4th - 11th Grade