A student changes the loop to:
while current <= 7:
if current % 2 == 0:
continue
total = total + current
current = current + 1
The initial values are still current = 1 and total = 0.
Explain why this version never reaches the print statement. State the values of current and total once the program becomes stuck. [2 marks]
Return to the original program. Suppose only the increment is changed to:
current = current + 2
Would the final output change? Explain your answer by describing which values of current are processed. [2 marks]
A kültéri védelemben passzív infra mozgáséezékelőt nem használunk.
Consider:
current = 1
total = 0
while current <= 7:
if current % 2 != 0:
total = total + current
current = current + 1
print("Total:", total)
Complete the table. Record total at the end of the iteration that processes the stated value of current. [2 marks]
Value of current being processed | total at the end of that iteration |
| 3 | |
| 4 | |
| 5 | |
| 7 |
Quelle information donne le rapport Production / Biomasse (P/B) ?
Pourquoi une partie de l’énergie est perdue entre chaque niveau trophique ?
quelle est la valeur moyenne des rendements trophiques ?
Qu’est-ce qu’un rendement trophique ?