diff --git a/weightConverterExample.py b/weightConverterExample.py new file mode 100644 index 0000000..46ec17e --- /dev/null +++ b/weightConverterExample.py @@ -0,0 +1,8 @@ +weight = float(input("Enter weight: ")) +unit = input("Is it in (K)g or (L)bs?: ") +if unit.upper() == "K": + converted = weight / 0.45 + print ("Weight in Lbs: " + str(converted)) +else: + converted = weight * 0.45 + print ("Weight in Kg: " + str(converted)) \ No newline at end of file