
Python and Computer Science Quiz
Authored by Tushar Tushar
Computers
12th 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
30 sec • 1 pt
What is the output of 'print(3*2**3)' in Python?
12
24
30
18
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Explain the difference between '==' and 'is' in Python.
'==' checks for reference equality, while 'is' checks for value equality.
'==' compares data types, while 'is' compares values.
The '==' operator compares values, while the 'is' operator compares identities.
'==' is used for string comparison, while 'is' is used for integer comparison.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of 'if __name__ == '__main__': in Python scripts?
To define a new function
To create a loop
To import external libraries
To check if the script is being run directly or imported as a module.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between a list and a tuple in Python?
Lists and tuples cannot store different data types.
Lists and tuples have the same methods available for manipulation.
Lists are immutable, tuples are mutable.
Lists are mutable, tuples are immutable.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Explain the concept of object-oriented programming.
Object-oriented programming does not involve the use of methods or functions.
Object-oriented programming is a programming paradigm based on the concept of objects, which can contain data in the form of fields (attributes or properties) and code in the form of procedures (methods or functions). It allows for the organization of code into reusable and modular structures, promoting concepts such as encapsulation, inheritance, and polymorphism.
Object-oriented programming is a programming paradigm based on the concept of variables only.
Object-oriented programming does not support the concepts of encapsulation, inheritance, or polymorphism.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you handle exceptions in Python?
Use for loops in Python.
Use try-except blocks in Python.
Use if-else statements in Python.
Use switch-case statements in Python.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the use of 'self' in Python classes?
It is used as a reference to the current instance of the class.
It is used to access global variables within the class
It is used to define a new class within the current class
It is used to import external modules into the class
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
20 questions
Network topologies
Quiz
•
8th Grade - University
15 questions
Quiz 1
Quiz
•
1st - 12th Grade
10 questions
PUNCTUATION SPACING RULES
Quiz
•
9th - 12th Grade
10 questions
COMPUTER PROGRAMMING Q2_FLOWCHART (2 points each)
Quiz
•
11th - 12th Grade
10 questions
Explorando Tinkercad en Secundaria
Quiz
•
7th Grade - University
20 questions
2324tx6
Quiz
•
9th - 12th Grade
11 questions
Threats to Data
Quiz
•
9th - 12th Grade
15 questions
1.1.1 The structure and function of the processor
Quiz
•
11th Grade - 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