Files
codeql/python/ql/src/Variables/UnusedLocalVariable.py
2018-11-19 15:10:42 +00:00

11 lines
271 B
Python

import random
def write_random_to_file():
no = random.randint(1, 10)
with open("random.txt", "w") as file:
file.write(str(no))
return no
def write_random():
random_no = write_random_to_file()
print "A random number was written to random.txt"