0
Problems Running my Code on the Code Playground
My code doesn't work when I run it on the Sololearn code playground, but it works when I run it on trinket.io/python/. How can I fix it so it runs properly on the Sololearn code playground?
2 Answers
+ 3
Anwyn Eisinger please show us your code as it is easier to diagnose / troubleshoot a problem with eyes than by guessing that your code exist.
Thanks and happy coding.
0
@BroFar Here is my code:
from time import sleep
print('You are a detective and you must solve the murder mystery.')
sleep(3) #pause code for 3 seconds
print('To solve the mystery, you must find out who the murderer was and what weapon they used.')
sleep(3)
print('After entering your numbers, run the code to solve the mystery.')
sleep(3)
print('Good luck detective!')
sleep(3)
######################################
weapon = (1)
# Here you must replace "pick a number" with any number you choose
if weapon <= 9:
print("\nThe weapon was a knife.")
elif weapon in range(9, 18):
print("\nThe weapon was a dagger.")
elif weapon in range(150, 501):
print("\nThe weapon was a gun.")
else:
print("\nThe weapon was a lead pipe.")
####################################
sleep(3)
murderer = (1)
# Here you must replace "pick a number" with any number you choose
if murderer <= 9:
print("\nThe murderer was Dr. Snow.")
elif murderer in range(9, 18):
print("\nThe murderer was Mrs. White.")
elif murderer in range(150, 501):
print("\nThe murderer was Victoria Villian.")
else:
print("\nThe murderer was Bob.")
####################################
sleep(2)
print('\nGood work detective!')