mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 14:35:23 +01:00
Merge branch 'master' of https://github.com/Todarith/mathgenerator
Conflicts: mathgenerator/funcs/celsiustofahrenheit.py
This commit is contained in:
@@ -83,3 +83,4 @@ from .determinantToMatrix22 import *
|
|||||||
from .compoundInterestFunc import *
|
from .compoundInterestFunc import *
|
||||||
from .deciToHexaFunc import *
|
from .deciToHexaFunc import *
|
||||||
from .percentageFunc import *
|
from .percentageFunc import *
|
||||||
|
from .celsiustofahrenheit import *
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
from .__init__ import *
|
from .__init__ import *
|
||||||
from ..__init__ import Generator
|
from ..__init__ import Generator
|
||||||
|
|
||||||
|
|
||||||
def celsiustofahrenheitFunc(maxTemp=100):
|
def celsiustofahrenheitFunc(maxTemp=100):
|
||||||
celsius = random.randint(-50, maxTemp)
|
celsius = random.randint(-50, maxTemp)
|
||||||
fahrenheit = (celsius * (9/5)) +32
|
fahrenheit = (celsius * (9 / 5)) + 32
|
||||||
problem = "Convert " + str(celsius) + " degrees Celsius to degrees Fahrenheit = "
|
problem = "Convert", str(celsius), "degrees Celsius to degrees Fahrenheit ="
|
||||||
solution = str(fahrenheit)
|
solution = str(fahrenheit)
|
||||||
return problem, solution
|
return problem, solution
|
||||||
|
|
||||||
celsiustofahrenheit = Generator("Celsius To Fahrenheit", 81, "(C +(9/5))+32=", "F", celsiustofahrenheitFunc)
|
|
||||||
|
celsiustofahrenheit = Generator("Celsius To Fahrenheit", 81,
|
||||||
|
"(C +(9/5))+32=", "F", celsiustofahrenheitFunc)
|
||||||
|
|||||||
Reference in New Issue
Block a user