Kristi W.

asked • 01/29/20

Math Programming Multiplication Table

I need to write a program where the user can specify both the number and up to which multiple. For example, I want the first 15 multiples of 9..etc. I also have to use the is_integer() method to display an error message if the input is a number with significant digits beyond the decimal point. So far I have:

def mult_table(a):

a = int(input('Enter a number: '))

b = int(input('Enter multiple you want: '))

for i in range(1,b+1):

print('{0} x {1}={2}'.format(a*b))

if a.is_integer == True

return True

else:

print('Please fix input')

mult_table()

But I keep getting errors. Thanks for the help!

1 Expert Answer

By:

Eli J. answered • 01/29/20

Tutor
New to Wyzant

Expert Math Tutor: All Ages and Courses

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.