CodeSolved

Solved Programming Questions & Exercises

Comparison of two numbers (no conditional commands)

Practice Easy 911/ Download 824 Views

Write a program that receives two A and B numbers from the user and checks whether the number A is larger than the number B. The output should be true or false.


Tip: In this exercise you should not use conditional commands like if. (The use of comparative operators is permitted)

17 Answers

a = float(input("adad1: "))
b = float(input("adad2: "))
c = a > b
print(c)

F.sarli Download Python New
This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
a = int(input("Adad Aval :"))
b = int(input("Adad Dovom :"))
print(a>b)
Programmer Download Python
a = int(input('Please enter a num 1 : '))
b = int(input('Please enter a num 2 : '))
c = a > b
bool(c)
print(c)
a = int(input("enter your number a:"))
b = int(input("enter your number b:"))
c = a > b
print(bool(c))
Sumy.amiri Download Python
a = input("a :")
b = input("b :")
print(a > b)
,....................
a = int(input("a :"))
b = int(input("b :"))
print(a > b)
J1625 Download Python
<< Previous page 1 2 Next page >>

Submit answer

Submitting answers is currently unavailable.

Related content

Detection using AI
×
×
Close