I'm getting the user to input an integer. If they don't do that, I want to inform them of their error and ask them to provide a different input.
This is what I have so far:
while (float(dimension) % int(dimension)) > 0:
prompt = "That number won't work. Please enter an integer between 3-9"
prompt += "\n>>>"
dimension = input(prompt)
Every time I run it, let's say to test it I enter the number 5.1. This is the error I get in response:
ValueError: invalid literal for int() with base 10: 5.1
this happens with any non-integer number I enter in. Not sure what I'm doing wrong.