[Python] why my code won't run in visual studio code? [closed]

Discussão em 'Python' iniciado por Stack, Fevereiro 18, 2025.

  1. Stack

    Stack Membro Participativo

    here is the screenshot

    I tried to fixing it but still won't work. I have this following code:

    def deposit():
    while True:
    amount = input("What would you like to deposit? $")
    if amount.isdigit():
    amount = int(amount)
    if amount > 0:
    break
    else:
    print("Amount must be greater than 0.")
    else:
    print("Please enter a number.")

    return amount

    deposit()


    and the result is this:

    [Running] python -u "c:\Users\admin\Desktop\Python Project\main.py"

    [Done] exited with code=0 in 0.095 seconds

    Continue reading...

Compartilhe esta Página