I want to make a program which simulates a virus. (Just for trolling)
I have following code:
import random
import os
user_input = int(input("Your number between 0 and 100: "))
if user_input >= 50:
random_number = random.randint(user_input, 100)
elif user_input <= 49:
random_number = random.randint(0, user_input)
if user_input <= 100 and user_input >= 0:
if user_input == random_number:
print("Luckly")
print(user_input)
print(random_number)
else:
print("All your programs will be shut down!")
print(user_input)
print(random_number)
shut_down_file = open("shut_down_script.py", "w")
shut_down_file.write("print('You got hacked!')accept_task = input('Your PC will be shut down! (Press any key): ')")
shut_down_file.close()
os.startfile("shut_down_script.py")
I get no error, but it does not work. The shut_down_script program opens and closes directly although i have editet the code, that the user have to input anything