Coderwall
Ruby Python JavaScript Front-End Tools iOS
More Tips
Ruby Python JavaScript Front-End Tools iOS PHP Android .NET Java Jobs
Jobs
Sign In or Up
Last Updated: February 25, 2016
·
1.032K
· lingmnz

2 + 2 = 5

#python
#math
>>> num = 2.49
>>> print '%.f' % num, '+', '%.f' % num, '=', '%.f' % (num + num)
2 + 2 = 5

http://www.quora.com/Mathematics/How-can-you-make-2-+-2-5/answer/Sanjay-Sabnani

'%.f' % 2.5 = 2
'%.f' % 2.6 = 3

https://github.com/israWic/code/blob/master/225.py

#python
#math

Written by นักศึกษากึ่งสำเร็จรูป

Say Thanks
Respond

Related protips

Prime Numbers with Python

11.42K
1

Math and Int/Float in Python

4.597K
1

Prime Numbers with Python v2

3.408K
3

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Best #Python Authors
terrasea
341.7K
#python
#Dart
#Java
cheglastgnat
303.7K
#python
#shell
#c++
projectcleverweb
291.6K
#python
#javascript
#css
saji89
253.8K
#python
#mantis
#linux
lotia
207.2K
#python
#Open Source
#Shell
Related Tags
#python
#math
Sponsored by
#native_company#
#native_desc#
#native_cta#
Awesome Job
See All Jobs

Post a job for only $299
Thanks to our sponsor
Sponsored by #native_company# — Learn More
#native_title# #native_desc#
#native_cta#
@coderwall
APM product comparisons Contact Privacy Terms

Copyright 2025

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.