gosha gosha

Generation

generate functionSun, 12 Feb 2023

By chance, override shutdown. If the chance is 20%, the override shutdown will fail! Overriding the shutdown will succeed if the chance is 70%!

import random while True: chance = input("Enter the chance: ") if chance.isdigit() and 0 <= int(chance) <= 100: break if random.randint(1, 100) <= int(chance): print("Shutting down") else: print("Error Overriding Shutdown")

Questions about programming?Chat with your personal AI assistant