0
Why the mistake
if hour < 7 { print("Good Morning!") } else if hour < 17 { print("Good Aftermoon!") } else if hour < 20 { print("Good Evening!")
2 ответов
+ 1
Md20101389
There should be colon(:) after each condition like
if hour < 7:
There is elif in python not else if
+ 1
Add a programming language name in post tags for context clarity sake. If it was Python, curly braces are not necessary - code indentation is.
https://code.sololearn.com/W3uiji9X28C1/?ref=app