Hello!
Before I solve a problem I usually always draw a structogramm and then start to code. But I just can´t find a way how to code
this structogramm. I have the feeling that I´m doing something wrong with the if-statements
I would be very happy if you could code exactly this structogramm attached to this thread and show me how you would do it!
Thanks
SW
This is the structogram: https://ibb.co/NKtMLrC
Before I solve a problem I usually always draw a structogramm and then start to code. But I just can´t find a way how to code
this structogramm. I have the feeling that I´m doing something wrong with the if-statements
I would be very happy if you could code exactly this structogramm attached to this thread and show me how you would do it!
Thanks
SW
This is the structogram: https://ibb.co/NKtMLrC
leap = 0
year = int(input("Please type in your year :"))
if year%4 == 0:
pass
if year%100 == 0:
pass
else:
leap = 1
if year%400 == 0:
leap = 1
else:
pass
if leap == 1:
print("This year is a leap year")
else:
print("This year isn´t a leap year")
