mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
11 lines
271 B
Python
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" |