How not to crash the system. ONLY numbers.

First read my code, then I’ll explain

only

It is as easy as only placing a “while True:” loop in order to save the system to break and crash and mutate every living form on Earth into stellar dust from another dimension.

What this loop does is that prevents the code for failing for some sort of input that is not valid, as you can see, I was only asking for an “int”, that’s why I use the function to change the input, but if the user is too dumb and tries to write using letter, everything will be ruined. At first I didn’t think it was going to be too easy, but it was such an easy topic that I was eating some cake at the time I wrote it (cheese cake).

Resultado de imagen para cheesecake

Funfact: You can use the same method for strings, floats, just let your imagination fly and you’ll be able to do amazing things.

3 Comments

Leave a comment