Understanding python characters
if 5==15/3:
here why ":" is given and what is the meaning of it in python
4 answers ( 0 marked as helpful)
Hi M Shahriar!
Great to have you in the course and thanks for reaching out!
This is just the way the Python syntax works. The colon sign (:) indicates the beginning of the condition statement we indicate with the if operator. After the colon sign, we state the condition itself.
Hope this helps.
Best,
Ivan
Hi when I write the statement and hit enter it does not give me an answer if 5==15/3:
print("hello")
There might be few scenarios while u didn't get desired answer
If 5==15/3(condition == true) :
(tab or space)print("Hello")
Just check where you're lacking in syntax or just examine the error u recieve(if any)