Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge: Countdown Timer 7 | PHP Loops: for, while, foreach
PHP Loops & Iteration

bookChallenge: Countdown Timer 7

Tâche

Swipe to start coding

Write a function that performs a countdown from 10 to 1 and then prints a message.

  • Use a while loop to print each number from 10 down to 1, one per line.
  • After the countdown, print the message "Blast off!" on a new line.

Solution

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 4
single

single

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

close

bookChallenge: Countdown Timer 7

Glissez pour afficher le menu

Tâche

Swipe to start coding

Write a function that performs a countdown from 10 to 1 and then prints a message.

  • Use a while loop to print each number from 10 down to 1, one per line.
  • After the countdown, print the message "Blast off!" on a new line.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 4
single

single

some-alt