wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Recuperacion final parte 1

Total questions: 20

Worksheet time: 38mins

Name
Class
Date
1.

What is Python?

a)

A programming language

b)

A program to make programs

c)

A type of game

d)

A design language

2.

In Python, the function (a)   allows you to display text or the content of a variable on the screen

3.

What is displayed on the screen?

a)

age

b)

(age)

c)

Your age is: 20

d)

20

4.

What are variables?

a)

A type of data that remains the same within a program

b)

The same as a program

c)

Data of a function

d)

An identifier for storing data

5.

In Python, there are different types of resources that we can use, such as variables, lists, functions, tuples, dictionaries, and at the same time, these elements can contain data. What types of data can be stored in these resources?

a)

texts, numbers, booleans

b)

Integers, decimals, complexes

c)

true, false

d)

addition, subtraction, multiplication, and division

6.

Operators are actions, commands, or symbols that we as programmers know and use for some task we have in mind, the operator ( = ) translates to or means ...

a)

to give or assign a value

b)

equal to

c)

result of some operation

d)

greater than or equal to

7.

What is the correct syntax to write a variable that contains text

a)

variable = "Text"

b)

variable = text

c)

my variable = ("text")

d)

variable = text

8.

Write in a single line of code a function that prints "Hello world"

(a)  

9.

In what position of the array is the element "conejo"

a)

mi_lista[2]

b)

mi_lista[1]

c)

mi_lista[3]

d)

mi_lista[4]

10.

"False" is a variable of type

a)

Boolean

b)

String

c)

Integer

d)

Float

11.

Loops in Python.

Analyze and complete the code.

Numbers from 1 to 10 should be printed.

Do not leave unnecessary spaces in your answer.

(a)  

12.

Define a function water that takes a single temperature parameter (in degrees Celsius), and prints whether the water is a solid, liquid, or gas.

Remember the states of the water

Is solid if the temperature is below or equal to 0°,

is liquid if the teperature is between 1° and 100°

is gas if the temperature is over 100°

4 lines
13.

Given a list of what a group of people ordered and the price of each item as a dictionary, print the group's total bill.

ordered = ["steak", "fish", "salad"]

price ={ "steak": 15, "fish": 12, "chicken": 8, "salad": 7 }


4 lines
14.

What is the value in Z?

x = 10

y = 15

y = x + y

z = y + x

(a)  

15.

Using the variables a and b print 26

a=10

b="16"

(a)  

16.

Given the distance (In km) to a destination and the speedLimit in (km/h). print how long it would take to reach the destination IN MINUTES

distance = 120

speedLimit = 100

4 lines
17.

What is a list in Python?

a)

A type of variable

b)

A collection of items

c)

A function that returns multiple values

d)

A fixed-size array

18.

What does the 'len()' function do in Python?

a)

Checks if an object is empty

b)

Converts a string to a list

c)

Calculates the sum of a list

d)

Returns the length of an object

19.

What does the 'append()' method do in Python lists?

a)

Adds an item to the end of the list

b)

Append an item to the function

c)

Removes an item

d)

Includes a new item to the code that can be used as reference further in the code

20.

What is the output of the expression '5' + 3 in Python?

a)

2

b)

TypeError

c)

53

d)

8