Created
February 3, 2012 12:38
-
-
Save erkobridee/1729979 to your computer and use it in GitHub Desktop.
um dos desafios do site rankk.org
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Really elementary | |
A box contains some buttons. | |
1/4 of them are black, | |
1/8 of them are red, | |
and the rest are white. | |
There are 636 more white buttons than red buttons. | |
How many buttons are there altogether? | |
moreThan = 636 | |
black = 25% | |
red = 12.5% | |
white = 12.5% + moreThan | |
x = 0.25x + 0.125x + 0.125x + moreThan | |
x - 0.50x = moreThan | |
0.50x = moreThan | |
x = moreThan/0.50 | |
''' | |
def mathElementary(moreThan): | |
return moreThan/0.50 | |
print mathElementary(636) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment