Challenge: Print Odd Numbers
Aufgabe
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.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 1. Kapitel 2
single
Fragen Sie AI
Fragen Sie AI
Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen
Großartig!
Completion Rate verbessert auf 5.56
Challenge: Print Odd Numbers
Swipe um das Menü anzuzeigen
Aufgabe
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.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 1. Kapitel 2
single