Font size
WorksheetsQuiz di Programmazione Python
Total questions: 10
Worksheet time: 10mins
print("he77o w0rld".isdigit()) restituisce:
False
True
Errore
Niente
In un ciclo for i in range(2, 10, 2): print(i), cosa viene stampato?
2 4 6 8
2 3 4 5 6 7 8 9
2 4 6 8 10
4 6 8 10
s = [1, 2, 3, 4]; s.reverse() produce:
[4, 3, 2, 1]
[1, 2, 3, 4]
4, 3, 2, 1
[3, 4, 1, 2]
print("Python Programma Perfetto".find("p")) restituisce:
1
-1
Errore
0
Qual è l'output di print("abcdefghi"[::3])?
abcde
ace
bd
ae
Qual è l'output di print("Hello World".upper())?
hello world
HELLO WORLD
HELLO world
Hello World
print([1, 2, 3] + [4, 5, 6]) restituisce:
[4, 5, 6, 1, 2, 3]
1, 2, 3, 4, 5, 6
[1, 2, 3, 4]
[1, 2, 3, 4, 5, 6]
Qual è l'output di print("12345".replace("2", "9"))?
Errore
19345
12345
12945
contatore = 0
for i in range(0, 20, 3):
contatore += 1
Quanto vale contatore alla fine del ciclo (risposta in numero)?
(a)
Qual è il risultato di not (5 > 3)?
True
False
5
3
