Get the answers you need at Westonci.ca, where our expert community is dedicated to providing you with accurate information. Get expert answers to your questions quickly and accurately from our dedicated community of professionals. Connect with a community of professionals ready to provide precise solutions to your questions quickly and accurately.
Sagot :
Answer:
I'm pretty sure the problem is that you're prompting the user to input a string value instead of an int value. This can be done by putting int() before input()
To clean it up your way, try doing:
my_lista = []
n = int(input())
my_lista.append(n)
n1 = int(input())
my_lista.append(n1)
n2 = int(input())
my_lista.append(n2)
min_num = min(my_lista)
print(min_num)
If you want to shorten the code, you can also do it this way which gives you the same output:
my_list = []
for i in range(3):
n = int(input())
my_list.append(n)
print(min(my_list))
We hope you found what you were looking for. Feel free to revisit us for more answers and updated information. Thanks for using our service. We're always here to provide accurate and up-to-date answers to all your queries. Westonci.ca is committed to providing accurate answers. Come back soon for more trustworthy information.