Python3- Having difficulty getting the smallest number with a for-loop.
Task = Write a program that asks the user for ten numbers, and then prints the largest, the smallest, and how many are dividable by 3. Use the algorithm described earlier in this chapter. CODE: largest = 0 smallest = 0 amount=0 for count in range (1,11): num= int(input("please enter a number")) if num % 3 == 0: amount = amount + 1 if num > largest: largest = num if (number < smallest): smallest = number; print ("you have",amount,"numbers divisible by three" ) print( "Smallest is", smallest ) print( "Largest is", largest ) Could anyone please help me to get the number to be the actual smallest number inputted rather than 0? Thank you!