Challenge: Print Odd Numbers
Tâche
Swipe to start coding
Write a program that prints all odd numbers from 1 to 20 using a for loop with a custom step.
- Use a for loop to iterate through numbers starting at 1 and ending before 20.
- Set the step value in the loop so that only odd numbers are processed.
- Print each odd number on a new line.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 1. Chapitre 2
single
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion
Suggested prompts:
Can you explain this in simpler terms?
What are the main points I should remember?
Can you give me an example?
Awesome!
Completion rate improved to 5.56
Challenge: Print Odd Numbers
Glissez pour afficher le menu
Tâche
Swipe to start coding
Write a program that prints all odd numbers from 1 to 20 using a for loop with a custom step.
- Use a for loop to iterate through numbers starting at 1 and ending before 20.
- Set the step value in the loop so that only odd numbers are processed.
- Print each odd number on a new line.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 1. Chapitre 2
single