Wpis z mikrobloga

Hej mam problem z #python

WYskakuja mi bledy z if, else, elif. Na przykladzie ksiazki AutomateTheBoringStuff wklejam kod:

if name == 'Mary':

print('Hello Mary')

if password == 'swordfish':

print('Access granted.')

else:

print('Wrong password.')


Wyskakuje mi blad w kompilatorze

print('Hello Mary')

^

IndentationError: expected an indented block


Co jest problemem?
  • 8
  • Odpowiedz
  • Otrzymuj powiadomienia
    o nowych komentarzach

name=input("podaj imie")
password=input("podaj haslo")
if name == 'Mary' and password == 'swordfish':
print('Hello Mary')
print('Access granted.')
else:
  • Odpowiedz