19th Jan 2018, 7:35 AM
Mehrnaz
3 Antworten
+ 5
Or you could switch “i>=7” to “i<=7”. Then delete the else, but keep the iteration i+=1, and your code works also. Oma’s solution is more elegant, but either one works :). I hope this helps :).
19th Jan 2018, 8:03 AM
Jared
Jared - avatar
+ 4
u mix while and if here is a working version of your code https://code.sololearn.com/c3011VUtt9Ir/?ref=app
19th Jan 2018, 7:49 AM
Oma Falk
Oma Falk - avatar
+ 3
@jared yeah it works too! (-:
19th Jan 2018, 8:08 AM
Oma Falk
Oma Falk - avatar