Advertisement
bl00dt3ars

07. Safe Passwords Generator

Jan 24th, 2021
948
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.76 KB | None | 0 0
  1. third_symbol = int(input())
  2. fourth_symbol = int(input())
  3. max_combinations = int(input())
  4. total_combinations = 0
  5. first_and_last_symbol = 35
  6. second_and_before_last_symbol = 64
  7.  
  8. for i in range(1, third_symbol + 1):
  9.     for x in range(1, fourth_symbol + 1):
  10.         total_combinations += 1
  11.         if total_combinations > max_combinations:
  12.             break
  13.         if first_and_last_symbol > 55:
  14.             first_and_last_symbol = 35
  15.         if second_and_before_last_symbol > 96:
  16.             second_and_before_last_symbol = 64
  17.         print(f"{chr(first_and_last_symbol)}{chr(second_and_before_last_symbol)}{i}{x}{chr(second_and_before_last_symbol)}{chr(first_and_last_symbol)}", end="|")
  18.         first_and_last_symbol += 1
  19.         second_and_before_last_symbol += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement