Im trying to find a tutorial on this aspect of linking the number of units printed to the units themselves. So a user can specify how many outputs are generated in the type of unit they want, either pounds or kgs.
If someone can point me in the right direction, it would be appreciated.
import random
bmi_unit = input("Enter the units: , kg or pounds ")
bmi_sample = input("Enter a number of outputs : ")
while bmi_unit != 'pounds' or bmi_unit != 'kg':
if bmi_unit =='pounds':
for i in range("what ever the user wants):
print("bmi_unit" , i+1, '=', random.randint(10, 20),'pounds')
break
elif bmi_unit == 'kg':
for i in range(what ever the user wants):
print("bmi_unit ", i+1, "=" ,round(random.randint(10, 20)/2.205,2),"kg")
break
else :
bmi_unit = input("Incorrect input. Reinput the unit kg or pounds")