Qual è il valore di mystery dopo l’esecuzione di questa sequenza di enunciati?
mystery = 1
mystery = 1 – 2 * mystery
mystery = mystery + 1
P2 numeri e stringhe
Quiz
•
Computers
•
University
•
Hard
Renato Ferrero
FREE Resource
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Qual è il valore di mystery dopo l’esecuzione di questa sequenza di enunciati?
mystery = 1
mystery = 1 – 2 * mystery
mystery = mystery + 1
-3
0
1
3
2.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Ipotizzando m = 18 e n = 4, indicare il valore dell'espressione seguente: m // n + m % n
6.0
6.5
6
non calcolabile
3.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Se n è un numero intero pari > 0 e m = n + 1, indicare il valore dell'espressione seguente: round(0.5 * (n + m))
n - 1
n
m
m + 1
4.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Il seguente programma è corretto?
no: c'è un errore di compilazione
no: si verifica un'eccezione
no: il programma è eseguito, ma l'output è diverso da quello atteso
sì: il programma è correttamente eseguito
5.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Se voglio calcolare la parte intera della radice quadrata di un numero, quale codice è corretto?
6.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Definita la stringa s = "3", qual è il valore di s dopo l'istruzione s = s + s?
l'istruzione non è lecita
s = "3" perché le stringhe sono immutabili
s = "6"
s = "33"
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Definita t = "World", indicare il valore di: t[len(t) // 2]
o
r
l
l'espressione non è calcolabile
8.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Cosa visualizza il codice seguente?
stringa = "Imparo Python"
print(stringa[1::3])
mp
mpa
mrPh
c'è un errore di sintassi
12 questions
FLIP FLOP, LATCH e CONTATORI
Quiz
•
9th Grade - University
10 questions
C++ Classi, attributi e metodi
Quiz
•
University
8 questions
P3 Decisioni
Quiz
•
University
9 questions
Passaggio parametri
Quiz
•
University
6 questions
Campi e metodi statici
Quiz
•
University
10 questions
Quiz Strutture
Quiz
•
University
11 questions
C++ Funzioni
Quiz
•
University
12 questions
HTML
Quiz
•
University
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade