wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

May piscine 2nd quiz

Total questions: 12

Worksheet time: 6mins

Name
Class
Date
1.

What does this code print?

a)

Hello + World

b)

HelloWorld

c)

Hello World

d)

Error

2.

What does the command touch notes.txt do?

a)

Hides the file notes.txt

b)

Creates an empty file called notes.txt

c)

Opens the file notes.txt

d)

Deletes the file notes.txt

3.

What is the main teaching method used at 42 Abu Dhabi?

a)

Peer-to-peer learning

b)

Teacher-led sessions

c)

Lectures and textbooks

d)

Online video tutorials

4.

In python how do you create a variable with the value 5?

a)

x <- 5

b)

x = 5

c)

x := 5

d)

int x = 5

5.

Which of these is a string?

a)

None

b)

True

c)

42

d)

"Hello"

6.

Which command is used to move a file?

a)

mv

b)

cd

c)

go

d)

cp

7.

ℹ️ len() is a function that returns the number of characters in a string.

What will this code output?

a)

Error

b)

5

c)

6

d)

3

8.

Which symbol is used for multiplication in Python?

a)

^

b)

*

c)

x

d)

%

9.

How would you run a Python script named age.py from the terminal?

a)

bash age.py

b)

start age.py

c)

run age.py

d)

python3 age.py

10.

How do you display the current working directory?

a)

dir

b)

pwd

c)

whereami

d)

path

11.

Which command is used to list the files in the current directory?

a)

cd

b)

list

c)

ls

d)

show

12.

I am learning

a)

I am learning Python

b)

Python

c)

text

d)

I am learning