0

function name ispositive which takes integer as an argument and returns true;if the argument is positive no are false otherwis

Please make a program

14th Nov 2020, 6:40 AM
Zeroboy
Zeroboy - avatar
3 Respuestas
+ 5
It's memdatory to add your attempt along with questions like these.
14th Nov 2020, 6:42 AM
Arsenic
Arsenic - avatar
+ 3
bool ispositive(int x) { if(x>= 0) { return true; } else { return false; } } If you want the function to return true or false as string and not boolean then change bool to string and return "true" or "false" respectively
14th Nov 2020, 7:16 AM
CouldntBeBothered.py
CouldntBeBothered.py - avatar
+ 1
Thanks man....
14th Nov 2020, 7:26 AM
Zeroboy
Zeroboy - avatar