Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele Challenge: Using the Range Function | Loops in Python
Introduction to Python (dev copy)

bookChallenge: Using the Range Function

Tehtävä

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 print statement, whereas the for loop should just iterate from 10 to 20.

Ratkaisu

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 5. Luku 6
single

single

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

Suggested prompts:

Tiivistä tämä luku

Explain code

Explain why doesn't solve task

close

Awesome!

Completion rate improved to 1.64

bookChallenge: Using the Range Function

Pyyhkäise näyttääksesi valikon

Tehtävä

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 print statement, whereas the for loop should just iterate from 10 to 20.

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

close

Awesome!

Completion rate improved to 1.64
Osio 5. Luku 6
single

single

some-alt