Someone Please Help me how to write a command to show a number greater than something but less than the other | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Someone Please Help me how to write a command to show a number greater than something but less than the other

23rd Sep 2020, 6:49 AM
Uma Mahesh Pagidoju
Uma Mahesh Pagidoju - avatar
12 Answers
+ 3
print((n1+n2) //2)
23rd Sep 2020, 7:45 AM
Oma Falk
Oma Falk - avatar
+ 3
if you are checking the condition of multiple values at the same time, then i think you're referring to the 'when' statement.
23rd Sep 2020, 8:25 AM
daniel
daniel - avatar
+ 2
please tag the wanted language
23rd Sep 2020, 7:06 AM
Oma Falk
Oma Falk - avatar
+ 2
vinayak that's not my question My question is if I wanted to print something if the value lies between certain values Like in some games when you score something,according to your score they appreciate you like well done,keep it up, excellent That is what I asked who to write a code for something like that
23rd Sep 2020, 8:00 AM
Uma Mahesh Pagidoju
Uma Mahesh Pagidoju - avatar
+ 2
if 10<score<20: print("good")
23rd Sep 2020, 10:35 AM
Oma Falk
Oma Falk - avatar
+ 2
Use && between them
24th Sep 2020, 4:55 AM
Ashu Pathak
Ashu Pathak - avatar
+ 1
You use 'if ' statements
23rd Sep 2020, 7:08 AM
daniel
daniel - avatar
23rd Sep 2020, 9:31 AM
daniel
daniel - avatar
+ 1
If a and b are number. algorithm 1.first get two numbers. 2. compare both with comparison operator 3.print greatest number if(a>b) printf(a is greatest);
23rd Sep 2020, 12:15 PM
Mohammad Aarif Ansari
Mohammad Aarif Ansari - avatar
+ 1
Num>x && Num<y
25th Sep 2020, 6:25 AM
Raj Sharma
Raj Sharma - avatar
0
You have to specify the language
24th Sep 2020, 8:21 PM
Musa Hassan
- 1
Нр
24th Sep 2020, 7:41 AM
Иыи Ытыт
Иыи Ытыт - avatar