wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Quelle est la syntaxe correcte pour afficher "Hello World" en Python ?

a)

echo("Hello World");

b)

p("Hello World")

c)

print("Hello World")

d)

echo "Hello World"

2.

Comment insérer des COMMENTAIRES dans le code Python ?

a)

/*This is a comment*/

b)

#This is a comment

c)

//This is a comment

3.

Lequel n'est PAS un nom de variable légal ?

a)

_myvar

b)

myvar

c)

my-var

d)

Myvar

4.

Comment créez-vous une variable avec la valeur numérique 5 ?

a)

x = 5

b)

x = int(5)

c)

Both the other answers are correct

5.

Quelle est l'extension de fichier correcte pour les fichiers Python ?

a)
b)
c)

.pyth

d)

.pt

6.

Comment créez-vous une variable avec le nombre flottant 2.8 ?

a)

x = float(2.8)

b)

Both the other answers are correct

c)

x = 2.8

7.

En Python, 'Hello', est identique à "Hello"

a)

vrai

b)

faux

8.

Quel opérateur est utilisé pour multiplier des nombres ?

Suivant ❯

a)

*

b)

#

c)

x

d)

%

9.

Quel opérateur peut être utilisé pour comparer deux valeurs ?

a)

<>

b)

==

c)

><

d)

=

10.

Laquelle de ces collections définit une LISTE ?

a)

["apple", "banana", "cherry"]

b)

{"name": "apple", "color": "green"}

c)

{"apple", "banana", "cherry"}

d)

("apple", "banana", "cherry")