wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python Popularity and Applications

Total questions: 60

Worksheet time: 3625secs

Name
Class
Date
1.

How is Python utilized by companies like Netflix in their operations?

a)

For managing their physical server infrastructure.

b)

To create algorithms that recommend films based on viewing history.

c)

As a primary tool for video editing and production.

d)

To handle customer service calls automatically.

2.

What are some reasons for Python's widespread popularity?

a)

It is a proprietary language with high licensing fees.

b)

It is primarily used for highly specialized, niche applications.

c)

It is free, easy to read, and easy to learn.

d)

It requires extensive hardware resources to run efficiently.

3.

Which Python library is specifically designed for applying various machine learning techniques like clustering and logistic regression?

a)

Pandas

b)

NumPy

c)

scikit-learn

d)

Matplotlib

4.

In which scenario would Python be a suitable choice for data processing?

a)

When dealing with highly structured data that needs to be stored in a traditional relational database.

b)

When processing extremely large volumes of unstructured data and interacting with big data tools like Hadoop or Apache Spark.

c)

When the primary goal is to build high-performance, low-level system applications.

d)

When the project requires a programming language with a very small and specialized community.

5.

Who created Python?

a)

Guido van Rossum

b)

Monty Python

c)

Bill Gates

d)

Steve Jobs

6.

What is one of the key features of Python?

a)

Readable Syntax

b)

Complex Syntax

c)

Difficult to Learn

d)

Limited Applications

7.

Which library is used for numerical computing in Python?

a)

NumPy

b)

pandas

c)

Matplotlib

d)

Django

8.

What is the purpose of the Django framework?

a)

Web Development

b)

Data Analysis

c)

Machine Learning

d)

Game Development

9.

Who created Python?

a)

Guido van Rossum

b)

Monty Python

c)

Bill Gates

d)

Steve Jobs

10.

What is one of the key features of Python?

a)

Readable Syntax

b)

Complex Syntax

c)

Difficult to Learn

d)

Limited Applications

11.

Which library is used for numerical computing in Python?

a)

NumPy

b)

pandas

c)

Matplotlib

d)

Django

12.

What is the purpose of the Django framework?

a)

Web Development

b)

Data Analysis

c)

Machine Learning

d)

Game Development

13.

Which Python library is commonly used for data manipulation and analysis?

a)

NumPy

b)

pandas

c)

Matplotlib

d)

Flask

14.

What is the current version of Python?

a)

Python 2.x

b)

Python 3.x

c)

Python 4.x

d)

Python 5.x

15.

What is one of the use cases of Python?

a)

Web Development

b)

Building Mobile Apps

c)

Creating Video Games

d)

Designing Hardware

16.

Which Python library is commonly used for scientific and technical computing?

a)

NumPy

b)

pandas

c)

Matplotlib

d)

SciPy

17.

What is one of the ethical considerations for Python developers?

a)

Handling Sensitive Data

b)

Ignoring Security Measures

c)

Copying Code Without Permission

d)

Using Outdated Libraries

18.

What is one of the future trends for Python?

a)

Decreasing Popularity

b)

Limited Applications

c)

Emerging Technologies

d)

Obsolete Language

19.

Yang termasuk aturan sintaks pada python adalah

a)

Wajib Menggunakan Tag ( <> )

b)

Identasi tidak berpengaruh

c)

Wajib menggunakan simbol (;) pada setiap akhir script

d)

Case Sensitive

20.

Hashtag (#) digunakan untuk ?

a)

Medefinisikan Variabel

b)

Menampilkan Teks

c)

Menyatakan Statement

d)

Memberikan Pesan

21.

How would you create a program to display "Hello World!"

a)

print(Hello World!

b)

input("Hello World!")

c)

print("Hello World!")

d)

print(Hello World!)

22.
The number or word we give to a variable
a)
Value
b)
Bug
c)
Information
d)
Text
23.

What is the Python built-in function used to display numbers and text on the screen?

a)

print

b)

input

c)

output

d)

command

24.
What does the term 'debug' mean?
a)
Identify errors and fix them.
b)
Making a calculation
c)
A set of instructions
d)
Looking at code
25.
What symbol do you use to make a comment in Python?
a)
@
b)
¬
c)
;
d)
#
26.
What extension must you add to the end of a file when saving?
a)
.xlsx
b)
.pptx
c)
.docx
d)
.py
27.

If you want to create an empty list called colours in Python, which of the following is correct?

a)

colours = [ ]

b)

colours = ( )

c)

colours = { }

d)

colours = <>

28.
What letter will be printed on the screen after running this code:
a)
e
b)
x
c)
t
d)
Nothing prints
29.
What is the position of the name "Robert" in the following list:
a)
0
b)
1
c)
2
d)
3
30.
What does the APPEND procedure do in the following code:
a)
Adds Liverpool to the beginning of the list
b)
Replaces Bristol with Liverpool
c)
Replaces Manchester with Liverpool
d)
Adds Liverpool to the end of the list
31.
In the following code, "city" is an example of a what?
a)
List
b)
Loop
c)
Variable
d)
Array
32.

Each item in a list has an index. What is the first index in a Python list?

a)

0

b)

1

c)

a

d)

A

33.
What output will this code produce?
a)
4
b)
2
c)
3
d)
5
34.
What output will this code produce?
a)
3
b)
20
c)
25
d)
17
35.
What output will this code produce?
a)
1
b)
3
c)
2
d)
4
36.

What will the output be from the following code?

print(3+4)

a)

3+4

b)

7

c)

SyntaxError

d)

print(3+4)

37.
print("12"*3)
What would this print?
a)
36
b)
121212
c)
24
d)
12*3
38.

What will the output be from the following Python code?

Print("Hello world!)

a)

Name Error

b)

Hello world!

c)

"Hello world"

d)

Print(Hello world!)

39.

What will the output be from the following Python code?

print(9/3)

a)

3

b)

3.0

c)

9/3

d)

SyntaxError

40.

What will the output be from the following Python code?

print(Hello world!)

a)

Hello world!

b)

SyntaxError

c)

Hello world

d)

print(Hello world!)

41.
A location in memory used to store data that can be changed.
a)
Constant
b)
Value
c)
Variable
d)
Iteration
42.

What is the Python built-in function to converts a number to a string?

a)

str()

b)

int()

c)

parseInt()

d)

convert

43.
The correct way to write a variable in Python?
a)
my_variable = 10
b)
my variable = 10
c)
my_variable is 10
d)
my_variable: 10
44.

Which of these is correct Python conditional statement?

a)

IF answer == "Yes":

b)

if answer == "Yes"

c)

if answer == "Yes":

d)

if answer = "yes":

45.

Would the second line of this code produce an error? If so why?

copies = input("How many copies do you need?" )

number_of_copies = copies / 2

a)

yes, because you can't divide copies

b)

no, because you are going to be able to know how many copies are needed.

c)

yes, because you are dividing a string by an integer

d)

no, because it is a integer divided by an integer.

46.

Whats the difference between binary and unary operator?

a)

A binary operator needs two things, while a unary operator only needs one.

b)

A computer can use binary operators, but it cannot use unary operators.

47.

What is the output of the following program? Assume the user enters "Sarah" then, "Isthebest"

a)

Sarah Isthebest

b)

Sarah

Isthebest

c)

SarahIsthebest

d)

Isthebest Sarah

48.

True or false. Python has a variable called 'number'.

a)

True

b)

False

49.

Suppose you have a variable z = "6". What type of variable is this?

a)

int

b)

str

c)

float

d)

number

50.

What is the Python data type bool stand for?

a)

string

b)

integer

c)

Boolean

d)

float

51.

What is the primary purpose of the 'self' keyword in Python class methods?

a)

To create a new instance of the class.

b)

To define a static method.

c)

To refer to the instance of the class.

d)

To refer to the class itself.

52.

Which of the following is a valid way to create a list in Python?

a)

list = (1, 2, 3)

b)

list = [1, 2, 3]

c)

list = {1, 2, 3}

d)

list = <1, 2, 3>

53.

What will be the output of the following code:
print(type(5))

a)

TypeError

b)

5

c)

int

d)

54.

How many variables are there in this program?

a)

2

b)

3

c)

4

d)

5

55.

What would be the output of this program if the user input was 10?

a)

22.04

b)

220.4

c)

2204

d)

Error wrong data type

56.

What operator is being used in this program?

a)

less than

b)

greater than

c)

less than or equal to

d)

greater than or equal to

57.

What type of list is being used in this example?

a)

Dictionary

b)

List

c)

Tuple

d)

2d Array

58.

What data type represents a whole number?

a)

Float

b)

Int

c)

Boolean

d)

String

59.

What data type represents a decimal number?

a)

Float

b)

Int

c)

Boolean

d)

String

60.

What data type represents characters?

a)

Float

b)

Int

c)

Boolean

d)

String