I can't figure out why my code isn't weeding out any floats and is letting them run in the while loop (which then screws up the code). Is there something I can do to safeguard the 'while loop' - make it not run whenever a float is put in the input?
Here is my code:
if not a.isdigit() and int(a) < 0 and not b.isdigit() and int(b) < 0 :
print("Invalid input")
else :
count = 1
while count < int(b) :
c = count * int(a)
print('{} * {} = {}'.format(count, a, c))
count = count + 1
c = int(a) * int(b)
print('{} * {} = {}'.format(b, a, c))