import time
import tqdm
import alive_progress
def func():
    def bar(x, y):
        from time import sleep
        from tqdm import tqdm
        for i in tqdm(range(y)):
            sleep(x)
    
    try:
        a = int(input("Pick a number between 1 and 100 for valuable (a): "))
        print("Checking values...")
        bar(0.001, 100)
        if a < 1 or a > 100:
             while (a < 1 or a > 100):
                print("Invalid value, try again")
                a == 0
                a = int(input("Pick a number between 1 and 100 for valuable (a): "))
                print("Checking values...")
                bar(0.001, 100)  
        elif a >= 1 and a <= 100:
                print("Alright, value is in required conditions")
    except ValueError:
        a = ValueError
        while a == ValueError:
            print("Checking values...")
            bar(0.001, 100)  
            print("Invalid value, try again")
            a = int(input("Pick a number between 1 and 100 for valuable (a): "))
I wanted to create a program that checks if user's input is between 1 and 100, also I wanted to check if their input is string so I can turn it to integer. First time when I enter a string it works, but at the second time I got this error:
ValueError: invalid literal for int() with base 10: '/'
I'm newbie in Python, so can do a lot of errors.
I tried a lot of stuff, but nothing worked, so please, help me out!
 
     
    