Last answered:

14 Jun 2022

Posted on:

15 Nov 2021

0

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)
Instructor
Posted on:

17 Nov 2021

0

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

Posted on:

31 May 2022

0

Hi when I write the statement and hit enter it does not give me an answer if 5==15/3:
    print("hello")

Posted on:

31 May 2022

0

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)

Instructor
Posted on:

14 Jun 2022

0

Hi Hassan and Mayank!
@Mayank: thanks for sharing information with the Community!
@Hassan: please share a screenshot, so we can assist you better.
Best,
Ivan

Submit an answer