Home > OS >  I am unable to get any sort of output
I am unable to get any sort of output

Time:10-02

This is my python code: Only output that i get in the end is "True" Why am i not receiving output for others? Please help. I am using jupyter notebook on visual studio code. Kernel: Python 3.9 64-bit

# RELATIONAL OPERATORS
num1 = 10
num2 = 0
num3 = 10
str1 = "good"
str2 = "life"

# Equals to
num1 == num2
str1 == str2

# Not equal to
num1 != num2
str1 != str2
num1 != num3

# Greater Than
num1 > num2
str1 > str2

# Less Than
num1 < num3
str2 < str1

# Greater than or equal to
num1 >= num2
num2 >= num3
str1 >= str2

#Less then or equal to
num1 <= num2
num2 <= num3
str1 <= str2

CodePudding user response:

You'll have to wrap each of the statements in print()

num1 = 10
num2 = 0
num3 = 10
str1 = "good"
str2 = "life"

print(num1 == num2)
print(str1 == str2)
# so on and so forth
  • Related