Open ecoppen opened 2 years ago
done.....
This function should get the user input and return it as a floating point:
def userinput(user):
return float(input("enter number of rods: "))
This function needs to get the input value within it and then use it:
def printing():
rods = userinput()
print(f""" meters:{meters(rods))}
feet: {feet(meters(rods))}
miles: {miles(meters(rods))}
furlongs: {furlongs(rods)}
walking time in minutes : {walk(miles(meters(rods)))}
""")
This just becomes:
if __name__ == "__main__":
printing()
https://github.com/HR6002/programming-challenges-/blob/17c82adbdfce3b000d6bf07c4e783691b938a671/challenge1.py#L17-L23
Separate this into two functions, one for the input the other for the printing. Pass the return from the input function to the print/calculations.