Sep-28-2020, 08:07 PM
I edited my while loop to include the x:
unit = int(input("Please enter the unit: ")) mod = int(input("Please enter the mod: ")) count = 1 x = unit%mod while x != 1: count = count +1 unit = unit * count x = unit%mod else: print("The inverse is: ", count)Still does not seem to exit the while loop