[Tutor] beginning to code

Elmar Klein geokerbi at gmx.at
Sun Sep 10 07:32:17 EDT 2017


Hi there,

im starting to learn how to code (bougt me the "automate the boring 
stuff with phyton" book).

And im not going anywhere with a code sample using the "continue" statement.

The code i should try is as following:

while True:
       print ('who are you')
       name = input ()
       if name != 'bert':
               continue
         print ('hi, joe. pwd?')
         pwd = input ()
         if pwd == 'sword':
                 break
         print ('access granted')

But everytime this produces an error (unindent does not match any outer 
indention level) in the "print ('hi, joe. Pwd?')" sentence.

What am i doing wrong?

Greetings

kerbi





More information about the Tutor mailing list