livepython.net

40. Python Program to Compare Two Numbers

EasyBooleans

Overview

Compare two numbers with comparison operators.

Problem Statement

Store 12 in a and 7 in b. Print three comparisons and their answers, exactly like this:

12 > 7: True
12 == 7: False
12 < 7: False

Input

No input is required for this question.

Output

12 > 7: True
12 == 7: False
12 < 7: False

Learn this firstChapter 5 · Python Booleans and Comparison Operators
solution.py
# write your code here

EXPECTED OUTPUT

112 > 7: True
212 == 7: False
312 < 7: False

YOUR OUTPUT

Press Run to see your output here. Lines are compared with the expected output.