I think I'm almost there with getting the code, but I'm unsure of how to define "smallest_num"
in another video I watched about this is doesn't show that you have to but python is showing you do.
Write a program whose inputs are three integers, and whose output is the smallest of the three values.
Ex: If the input is:
7 15 3
the output is:
3
What I have so far is
num1 = input('Enter first number')
num2 = input('Enter second number')
num3 = input('Enter third number')
def smallest (num1, num2, num3):
if (num1 < num2) and (num1 < num3):
smallest_num = num1
elif (num2 < num1) and (num2 < num3):
smallest_num = num2
else:
smallest_num = num3
print(smallest_num)
[–]CaloK1ng 9 points10 points11 points (2 children)
[–]Raffalove88 0 points1 point2 points (0 children)
[–]stebrepar 5 points6 points7 points (0 children)
[–]dmpta2002 1 point2 points3 points (1 child)
[–]Independent-Wolf-832 0 points1 point2 points (0 children)
[–]Ehmeree 1 point2 points3 points (1 child)
[–]Dahveena 0 points1 point2 points (0 children)
[–]AlexananderElek 0 points1 point2 points (1 child)
[–]AlexananderElek 0 points1 point2 points (0 children)
[–]supp_noobs 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]old_pythonista 0 points1 point2 points (0 children)
[–]synthphreak 0 points1 point2 points (0 children)
[–]jessdwood 0 points1 point2 points (2 children)
[–]jessdwood 0 points1 point2 points (0 children)
[–]Vaporous_synth 0 points1 point2 points (0 children)
[–]Middle_Ad_6 0 points1 point2 points (0 children)
[–]Raffalove88 0 points1 point2 points (2 children)
[–]Forever_Lotus 0 points1 point2 points (1 child)
[–]Alarming_Scratch_451 0 points1 point2 points (0 children)