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 def override_shutdown(chance): if chance > random.random(): print("Shutdown overridden!") return True else: print("Shutdown failed!") return False override_shutdown(0.3)

Questions about programming?Chat with your personal AI assistant