- 1

Write statement in Python to find absolute value of 100.

this is program based question

2nd Aug 2018, 2:49 PM
Nikky choudhry
9 Réponses
+ 2
hinanawi to be precise, the question just asked to "find" the absolute value, not output it to the screen.
3rd Aug 2018, 1:37 AM
Satyam
+ 1
abs(100)
2nd Aug 2018, 2:51 PM
Satyam
+ 1
print(abs(100)) to be more precise
2nd Aug 2018, 3:15 PM
hinanawi
hinanawi - avatar
+ 1
hinanawi agree.
3rd Aug 2018, 6:27 AM
Satyam
0
if it -100 then?
2nd Aug 2018, 3:17 PM
Nikky choudhry
0
Nikky choudhry well your question was "absolute value of 100" the absolute value of -100 would just be: print(abs(-100))
2nd Aug 2018, 3:18 PM
hinanawi
hinanawi - avatar
0
ok thx
2nd Aug 2018, 3:19 PM
Nikky choudhry
0
S. C. correct, but that doesn't really serve a purpose given nothing actually happens within the program that the user is able to see haha
3rd Aug 2018, 6:12 AM
hinanawi
hinanawi - avatar
- 1
is it correct
2nd Aug 2018, 3:08 PM
Nikky choudhry