+ 1
Anyone correct my code
Please anyone help me "5 < x <= 10" how to write this on python https://code.sololearn.com/c4Nwhp4FEmC9/?ref=app
22 Antworten
+ 3
Álvaro Estévez López You can use
5 < x <= 10 directly.
+ 7
Madison please don't be rude to fellow members trying to help keep you out of trouble.
+ 3
Madison again, please don't spam in the answers. I will not reply further to any messages.
+ 2
Ok, good.
First to read the input you need
x = int(input())
Then you need to output exact texts from the challenge description.
Now you can continue from here. You need to change a little bit the logic in the if-elif statements.
Can you do it?
+ 2
Madison don't spam in the answers please.
+ 1
Don't think Batman understands hindi.
Post complete code from playground.
+ 1
"5 < x <= 10" how to write this on python
+ 1
Ok i understood thank you sir
+ 1
Akash Kumar Exactly like that, though I guess you need
5 <= x <= 10
+ 1
(5,10) 5 is included in this range or not?
+ 1
Akash Kumar Sorry I don't understand this last question.
+ 1
Lets say we will play if there are (5,10) players on ground, so in this situation if there are 5 players on the ground shall we play or not
+ 1
Here (5,10) means [5,6,7,8,9,10] or [6,7,8,9,10] ?
+ 1
Akash Kumar If there are 5, 6, 7, 8, 9, 10 bad guys you need to call Batman, so yes 5 is included.
+ 1
Ok thanks i solved this question thank you sir
+ 1
Akash Kumar You're welcome.
+ 1
x = int(input())
if x < 5:
print('i can handle this')
elif x >= 5 and x <= 10:
print("batman help me!")
else:
print("Good Luck batman!")
+ 1
See this tutorial
https://www.w3schools.com/howto/howto_js_autocomplete.asp
+ 1
#include <iostream>
using namespace std;
int main()
{
cout << "batman help me! \n\n";
cout << "Good Luck batman!";
return 0;
}