Revision Test- Programming in Python
Quiz
•
Computers
•
University
•
Hard
Chhinder Kaur
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Who developed Python Programming Language?
Wick van Rossum
Rasmus Lerdorf
Guido van Rossum
Niene Stom
Answer explanation
Python language is designed by a Dutch programmer Guido van Rossum in the Netherlands.
2.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which of the following is the correct extension of the Python file?
.python
.pl
.py
.p
Answer explanation
‘.py’ is the correct extension of the Python file. Python programs can be written in any text editor. To save these programs we need to save in files with file extension ‘.py’.
3.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which of the following is used to define a block of code in Python language?
Indentation
Key
Brackets
All of the mentioned
Answer explanation
In Python, to define a block of code we use indentation. Indentation refers to whitespaces at the beginning of the line.
4.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which of the following character is used to give single-line comments in Python?
//
#
!
/*
Answer explanation
To write single-line comments in Python use the Numero sign (#) at the beginning of the line. To write multi-line comments, close the text between triple quotes.
5.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What is the order of precedence in python?
Exponential, Parentheses, Multiplication, Division, Addition, Subtraction
Exponential, Parentheses, Division, Multiplication, Addition, Subtraction
Parentheses, Exponential, Multiplication, Division, Subtraction, Addition
Parentheses, Exponential, Multiplication, Division, Addition, Subtraction
Answer explanation
For order of precedence, just remember this PEMDAS (similar to BODMAS).
6.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which of the following is not a core data type in Python programming?
Tuples
Lists
Class
Dictionary
Answer explanation
Class is a user-defined data type.
7.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What will be the output of the following Python expression if x=56.236? print("%.2f"%x)
56.236
56.23
56.0000
56.24
Answer explanation
The expression shown above rounds off the given number to the number of decimal places specified. Since the expression given specifies rounding off to two decimal places, the output of this expression will be 56.24. Had the value been x=56.234 (last digit being any number less than 5), the output would have been 56.23.
Create a free account and access millions of resources
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
UTILITY PROGRAM
Quiz
•
University
10 questions
Data Warehouse - Foundations
Quiz
•
University
13 questions
Digital Technology Office 365 - 29May2020
Quiz
•
University - Professi...
15 questions
GIS Unit III
Quiz
•
University
20 questions
2.3.1 Graph Traversal & Path Finding Algorithms
Quiz
•
12th Grade - University
20 questions
Quiz Harian Gdevelop MPK
Quiz
•
University
20 questions
Digital and Analog transmission
Quiz
•
University
10 questions
java quiz on Encapsulation and Abstraction
Quiz
•
University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
Discover more resources for Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
7 questions
Different Types of Energy
Interactive video
•
4th Grade - University
20 questions
Slopes and Slope-Intercept Form
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Biomolecules (Updated)
Interactive video
•
11th Grade - University
20 questions
Winter/Holiday Trivia
Quiz
•
KG - University
10 questions
WINTER WIN Time - ELA - 12/9/2025
Quiz
•
KG - University
7 questions
Human Impact on Resources
Interactive video
•
4th Grade - University
