Trying to figure out how to get the maximum and minimum values of the random numbers that are displayed when the user inputs their numbers. I have
everything done, I just can't figure out my last two. ** means where I'm having my problem. Where I'm stuck at. When the user chooses the four numbers
the program should be able to try to find the lowest and highest values after the conversion. Been working on it all night and I'm pretty much stuck
right here.
Thanks for the help.
def convertFahtoCel(x):
return( x - 32 ) * 5 / 9
def convertCeltoFah(x):
return( x + 32 ) * 9 / 5
def colorcode(x):
if x >= 110:
print("Red")
elif x >=90:
print("Orange")
elif x >= 32:
print("Yellow")
else:
print("Blue")
** def low(x):
fah1, fah2, fah3, fah4
** def high(x):
fah1, fah2, fah3, fah4
def main():
fah1, fah2, fah3, fah4 = input("Enter 4 tempertures in degrees Fahrenheit seperated by a comma: "))
#Start of Fahreheit to Celcius variable table
print("Farenheit ", end="t")
print("Celsius ", end="t")
print("Color Code")
print("_____________________________________________")
print(fah1, end="tt")
print(format(convertFahtoCel(fah1), "0.1f"), end="tt")
colorcode(fah1)
print(fah2, end="tt")
print(format(convertFahtoCel(fah2), "0.1f"), end="tt")
colorcode(fah2)
print(fah3, end="tt")
print(format(convertFahtoCel(fah3), "0.1f"), end="tt")
colorcode(fah3)
print(fah4, end="tt")
print(format(convertFahtoCel(fah4), "0.1f"), end="tt")
colorcode(fah4)
print("______________________________________________")
#End Table
#Start of second table
print()
print("Low/High ", end="t")
print(" Fahreheit ", end="t")
print(" Celsius ", end="t")
print("Color Code")
print("______________________________________________")
print("Low", end="t")
print(low, end="tt")
** print(format(convertFahtoCel(low), "0.1f"), end="tt")
** print(format(convertCeltoFah(low), "0.1f"), end="tt")
colorcode(low)
print("High", end="t")
print(high, end="tt")
** print(format(convertFahtoCel(high), "0.1f"), end="tt")
** print(format(convertCeltoFah(high), "0.1f"), end="tt")
colorcode(high)
main()
edit on 11-10-2012 by Manhater because: (no reason given)
edit on 11-10-2012 by Manhater because: (no reason given)