Challenge: Using the Range Function
Swipe to start coding
Using a for loop, print all the numbers from 10 to 20 (inclusive) squared (100, 121, 144, and so on). Make sure your output includes the squares of both the starting number (100) and the ending number (400).
Note
The square operator should only be applied in the
forloop should just iterate from10to20.
Løsning
Tak for dine kommentarer!
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat
Opsummér dette kapitel
Explain code
Explain why doesn't solve task
Fantastisk!
Completion rate forbedret til 1.64
Challenge: Using the Range Function
Stryg for at vise menuen
Swipe to start coding
Using a for loop, print all the numbers from 10 to 20 (inclusive) squared (100, 121, 144, and so on). Make sure your output includes the squares of both the starting number (100) and the ending number (400).
Note
The square operator should only be applied in the
forloop should just iterate from10to20.
Løsning
Tak for dine kommentarer!
single