Revision Test- Programming in Python

Revision Test- Programming in Python

University

15 Qs

quiz-placeholder

Similar activities

uas-siber

uas-siber

University

10 Qs

DI (EM24) - Diseño de Contenidos (T8)

DI (EM24) - Diseño de Contenidos (T8)

University - Professional Development

20 Qs

Recording Software Button Identification Quiz

Recording Software Button Identification Quiz

8th Grade - University

10 Qs

Round 2 for Preplacement Bootcamp

Round 2 for Preplacement Bootcamp

University

15 Qs

Internet

Internet

University

11 Qs

Algo Quiz

Algo Quiz

University

16 Qs

Server Administration- Quiz 1

Server Administration- Quiz 1

12th Grade - University

10 Qs

Computer Science (1-9) - Identifying & Preventing Threats

Computer Science (1-9) - Identifying & Preventing Threats

University

11 Qs

Revision Test- Programming in Python

Revision Test- Programming in Python

Assessment

Quiz

Computers

University

Hard

Created by

Chhinder Kaur

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?