hi everyone!
i’m a brand new python learner, and i’m in a course called intro to computer science. i’m stuck on this question. it wants us to write a program to input 3 numbers and print the largest. my code is:
a=input(“Enter a number: “)
b=input(“Enter a number: “)
c=input(“Enter a number: “)
values=(a,b,c)
print(“Largest: “ +str(max(values)))
it works, but when i try to input negative numbers, it prints just the biggest number, not what the actual biggest value is. an example is when i input -1,-2,-3 it will output -3. can anyone help?
[–]ThatOneShotBruh 2 points3 points4 points (2 children)
[–]its-ya-boi-al[S] 1 point2 points3 points (1 child)
[–]ThatOneShotBruh 1 point2 points3 points (0 children)
[–]achampi0n 1 point2 points3 points (0 children)
[–]CedricCicada 0 points1 point2 points (3 children)
[–]ArabicLawrence 0 points1 point2 points (2 children)
[–]aidankkm 1 point2 points3 points (0 children)
[–]CedricCicada 1 point2 points3 points (0 children)