Python Editor

Python | Lesson 1 | Boolean


#Boolean values are True or False.

print(50>60)
print(34<20)

a = 45
b = 56
if a > b:
  print("a is greater than b")
else:
  print("a is not greater than b")

3 comments:

  1. x="123"
    y="456"
    z="789"
    q=x+y+z
    print(q)
    -Snithik Kollipara

    ReplyDelete
    Replies
    1. If you define variable as string, when you use arithmetic operator +, you see answer 123456789. If you are solving sum of x,y,z problem, define the variable as int (without the quotes)

      Delete
  2. a = int(input(“number a=“))
    b = int(input(“number b=“))
    c = a + b
    Print(c)

    ReplyDelete