Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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

click to hide/show revision 2
No.2 Revision

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)

click to hide/show revision 3
No.3 Revision

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 []
click to hide/show revision 4
No.4 Revision

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