online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
import random import string class ValueErrorLessOrZero(Exception): pass PASSWORD_CHARACTERS = string.ascii_letters + string.digits + string.punctuation def generate_password(size=8, chars=PASSWORD_CHARACTERS) -> str: return ''.join(random.choice(chars) for _ in range(size)) while True: try: size = int(input("Jaka ma być długość hasła? ")) if size == 0: raise ValueErrorLessOrZero("Podaj liczbę większą od zera.") if size < 0: raise ValueErrorLessOrZero("Podaj liczbę dodatnią.") print("\n", generate_password(size), "\n", sep="") user_choice = input(" + Wpisz 'N' - aby zakończyć program\n" \ " + Naciśnij sam Enter - nowe hasło\n>> ") if user_choice in ['n', 'N']: break except ValueErrorLessOrZero as error: print("Nieprawidłowa wartość. " + str(error)) except ValueError: print("Nieprawidłowa wartość. Podaj liczbę całkowitą.") input("\n\nAby zakończyć program naciśnij ENTER") print("Dziękuję i do zobaczenia ponownie.")

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue