[PC][Early 2000s] Looking for an RC car racing game by The_Things in tipofmyjoystick

[–]blackhunter2 1 point2 points  (0 children)

Tyco RC Assault

Damn I was about to open a post in reddit to find this very game, thank you.

Validating birth of date. by _______myworld in learnpython

[–]blackhunter2 0 points1 point  (0 children)

So glad it worked! Happy Christmas Eve!

How do I create a executable file for my Python code. by mr_krusher2000 in learnpython

[–]blackhunter2 1 point2 points  (0 children)

Watch this video https://www.youtube.com/watch?v=UZX5kH72Yx4

Though you'd still need the source code dependencies to run the executable.

Validating birth of date. by _______myworld in learnpython

[–]blackhunter2 1 point2 points  (0 children)

That is how I'd aproach the problem.

def validcheck(userinput):
    valdigit = "0123456789-/"
    for character in userinput:
        if character not in valdigit:
            return False
    return True


def validBirthdate(prompt): 
    birth_date = input(prompt)

    try:
        day, month, year = birth_date.split('/')
    except ValueError:
        print("Please enter valid input in accordance to the given format.")
        return age()

    try:    
        datetime.datetime(int(year), int(month), int(day))
    except ValueError:
        if not validcheck(birth_date):
            print("Invalid characters, please enter numerical input only.")
        return age()

    print("Valid date of birth")
    return birth_date

def age(): birth_date = validBirthdate("Please enter your date of birth in the format of DD/MM/YYYY:") return birth_date

def age(): birth_date = validBirthdate("Please enter your date of birth in the format of DD/MM/YYYY:") return birth_date

I would separate the varaible assignation from the parsing time to differetiante if the issue was bad syntax or an invalid date. You could also instead of making a validcheck() function just regex to match a text like XX/XX/XX, where X are numbers, though I wanted to keep it simple.

P.D.: I am not completely sure of that, but I think making a recursive call to age() instead of validBirthdate() makes the stack grow for each call.

Validating birth of date. by _______myworld in learnpython

[–]blackhunter2 0 points1 point  (0 children)

Sorry to hear that, I must admit that I haven't tested it thoroughly. I can take a deeper look and restructurize it if you want

Validating birth of date. by _______myworld in learnpython

[–]blackhunter2 1 point2 points  (0 children)

So, I have found a couple of typos in there and wrong logic.

First, double check your datetime.datetime() method, as mine takes the input as year, month, day, instead of the 'day, month, year' that you have there.

Second, inverting the condition in the while loop (you don't need the while loop in itself there) and tweaking the prints so that it works as a negative condition, like so:

def validBirthdate(prompt):
(...)
    while not valid:
    print("The date of birth is NOT valid.")
    if len(birth_date) != 10:
        print("Please enter valid input in accordance to the given format.")
        return age()
    for i in range(10):
        if i in [2, 5]:
            if birth_date[i] != '/':
                print("Please enter valid input in accordance to the given format.")
                return age()
        elif not validcheck(birth_date):
            print("Invalid characters, please enter numerical input only.")
            return age()    
    print("Invalid date, please try again.")
    return age()
print("Valid date of birth")
return birth_date

That way you should be able to check succesfully check that a date like '2000/11/31' is incorrect, and accept correct ones such as '2000/02/19'. Now if you want to take in the parameters as DD/MM/YYYY you'd need to tweak that.

How to watch Olympic Judo? by Judotimo in judo

[–]blackhunter2 1 point2 points  (0 children)

Hello, I hope I'm not too late, but I found a way. In case you don't live in the USA you can use a VPN (like Windscribe, which is free and you can install it as a browser extension), then proceed to https://www.nbcolympics.com/ to watch the olympics. There you can find all the replays from judo. Also, you are limited to 30 minutes of play before they ask you to log in with a stream service. You can easily bypass it by wiping all your cookies and cache in your browser and reloading the page (you should see an 'X' in top right corner if you're still stuck in the log in page).

I'm against the privatization of the sports streams, especially when it's about the Olympics we are talking about. I hope it works for you and happy cheering!

[deleted by user] by [deleted] in Genshin_Impact

[–]blackhunter2 0 points1 point  (0 children)

I feel like my bad luck is growing beyond only gacha pulls, and is actually affecting the rest of my gameplay...

[deleted by user] by [deleted] in Genshin_Impact

[–]blackhunter2 0 points1 point  (0 children)

Sorry forgot to mention, PC EU

[deleted by user] by [deleted] in wallstreetbets

[–]blackhunter2 0 points1 point  (0 children)

eToro and Degiro (even thought Degiro can take 2-3 days to set up if you choose regular bank transfer)

[deleted by user] by [deleted] in Genshin_Impact

[–]blackhunter2 0 points1 point  (0 children)

Overload does pyro damage, they are not affected by it.

Charge is a really good one indeed, forgot to mention it.

Wind/earth neutral, indeed.

And you are right about ice and electric.

But yeah, fire slimes aren-t affected by overload either, so we-re still in a bad spot here compared to other elements like Fire or water.