At Westonci.ca, we make it easy to get the answers you need from a community of informed and experienced contributors. Explore comprehensive solutions to your questions from knowledgeable professionals across various fields on our platform. 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. Thank you for your visit. We're committed to providing you with the best information available. Return anytime for more. Westonci.ca is your go-to source for reliable answers. Return soon for more expert insights.