Looking for CC - P1 - Promo 2029 test answers and solutions? Browse our comprehensive collection of verified answers for CC - P1 - Promo 2029 at moodle.myefrei.fr.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
What is the display produced by the following sequence of instructions, assuming the user has entered the values 50, 25, 40, 45, 42 in order?
n <- 42
Do
Read(val)
If val < n Then
Write("More ")
Else
If val > n Then
Write("Less ")
End If
End If
While val != n
Write("Bravo!")
These lines of instruction may contain errors. Assume that all variables have been correctly declared. Find the errors.
Read(n)
try <- 5
Do
Read (val)
Write("You have " + try + " tries left")
try <- try - 2
While (try != 0)
What is the value of the variable count at the end of execution of the following sequence of instructions ?
count <- 0
For i <- 2 to 5 Do
For j <- 1 to 2 Do
If i % j = 0 Then
count <- count + 1
End If
End For
End For
What is the number of stars displayed by the following lines of instruction ?
n <- 5
For i <- 1 to n Do
For j <- n to i [-1] Do
Write("* ")
End For
Write("\NL")
End For
What is the output produced by the following sequence of instructions?
res <- 1
x <- 2
n <- 3
For i <- 1 to n Do
res <- res * x
End For
Write(x, "power", n = res)
Which of the following statements is true?
i <- 1
While i < 10 Do
If i % 2 = 0 Then
Write(i)
End If
i <- i + 1
End While
These lines of instruction may contain errors. Assume that all variables have been correctly declared. Find the errors.
arr <- {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
n <- 10
For i <- 1 to n Do
arr[i] <- arr[i] * 2
End For
Write(arr)
How many stars are displayed at the end of the execution of the following instruction lines?
n <- 5
For i <- 1 to n Do
j <- 1
While j < i Do
Write("* ")
j <- j + 1
End While
Write("\NL")
End For
Le gain de l’ampli-op suivant est :
Sachant que R1 = R3 = 30 k, R2 = 100 k et R4 = 1 k. Calculer l'impédance d'entrée Ze :Donner les valeurs en k, sans l'unité.