-1

Hi I'm new to programming and I'm currently learning Python through LinkedIn and I'm stuck at on one of the sample codes

def main():
    a, b = 1, 10
    if(a < b):
        st = "x is LESSER than y"
    print(st)

It's not even showing any error messages so I'm confused right now. (My interpreter is Python 3.7.4)

2 Answers2

0

You just created a function. You need to call the function to get executed

T_Zed
  • 11
  • 1
0

Instead of using a variable, you can directly print unless it's absolutely necessary. Call the function main()

def main():
    a, b = 1, 10
    if a < b:
        print("a is LESSER than b")

main()
pjk
  • 547
  • 3
  • 14