Video Demosntration
What is util_random.py?
Util_random.py is a module written in Python 3. It automatically generates secret number by using many mathematical operations using the function assign_code().
There is an extra function error(*arg) which prints out your error messages in an organized way.



EXAMPLE 1:
I want to generate a number for my account
Then I will create a file gen.py
import util_random as util # import module, for short put an as infront of it
# Calling function
my_number = assign_code()
# Print that number
print (my_number)

Output: Some Number
EXAMPLE 2
Use of error(...) function
Suppose I am writing a program to open a file
import util_random as util
try:
file = open("file.txt","r")
print(file.readline())
except:
error("Cannot open file!") # Use of error function

Output: Number of errors: 1 Error[0]: Cannot open file!


Programmer: Aadit Kapoor
Version: 1.0.0.0


For any queries email me at aadit.kapoor@outlook.com