Ask Your Question

Revision history [back]

In a for loop, the line must end with a colon :

In a for loop, the line must end with a colon :

By the way, if L is a list, you can add an element to L with L.append(element)

In a for loop, the line must end with a colon :

By the way, here are some hints for the exercise:

  • if L is a list, you can add an element to L with L.append(element)

  • the empty list is denoted by []

In a for loop, the line must end with a colon :

By the way, here are some hints for the exercise:

  • if L is a list, you can add an element to L with L.append(element)
  • the empty list is denoted by []
  • if you want to avoid the use of the square root, you can replace the for loop with a while loop