def guesses(words): return 99171**words def words_input(): return int(input("How many words is your password? ")) def time_input(): return float(input("How many seconds does it take to check a password? ")) def total_time(time, words): return time * guesses(words) / 2 def years(time, words): return total_time(time, words) / (60*60*24*365) def print_result(words, time): print("There are ", guesses(words) , " permutations with that many words") print("Average time to crack is ", total_time(time, words) , " seconds") print("In years, ", years(time, words)) print_result(words_input(), time_input())