0

Why >>>(4+8)/2 is equal to 6.0 not 6?

8th Apr 2017, 2:25 PM
ANIRUDDHA BAIDYA
ANIRUDDHA BAIDYA - avatar
8 ответов
+ 1
Floats
12th Apr 2017, 3:51 AM
DRAGONGAMING
DRAGONGAMING  - avatar
+ 1
Ya here's a example: a = float print(int(a(4 + 8))) the output is 12 not 12.0
12th Apr 2017, 3:57 AM
DRAGONGAMING
DRAGONGAMING  - avatar
+ 1
print((4 + 8) / 2) Ans: 6.0
6th Apr 2021, 12:30 PM
Mahnoor Shahzad
Mahnoor Shahzad - avatar
0
Please Elaborate
8th Apr 2017, 2:31 PM
ANIRUDDHA BAIDYA
ANIRUDDHA BAIDYA - avatar
0
Did you do: Print(4+8)/2
8th Apr 2017, 2:35 PM
DRAGONGAMING
DRAGONGAMING  - avatar
0
Yes
8th Apr 2017, 2:37 PM
ANIRUDDHA BAIDYA
ANIRUDDHA BAIDYA - avatar
0
Uuuhhh just a sec
12th Apr 2017, 3:52 AM
DRAGONGAMING
DRAGONGAMING  - avatar
0
So you need int and float
12th Apr 2017, 3:58 AM
DRAGONGAMING
DRAGONGAMING  - avatar