-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path24 (mod2).py
More file actions
84 lines (59 loc) · 1.68 KB
/
24 (mod2).py
File metadata and controls
84 lines (59 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import mod1
""" 120
True
True
True
"""
#_Pycache_
l = [100,200,300,400,500]
key = 500
print(mod1.binary_search(l,key))#True
l = [100,200,300,400,500]
key = 5000
print(mod1.binary_search(l,key)) #False
import math
help(math) # It will give a proper documentation of math command
import mod1
help(mod1)
""" Description :-
Help on module mod1:
NAME
mod1 - If a function call it self again and again is known as recursive function
DESCRIPTION
factorial(5) = 5 * fact(4)
4 * fact(3)
3 * fact(2)
2 * fact(1)
1
FUNCTIONS
binary_search(l, key)
factorial(num)
DATA
key = 100
l = [100, 200, 300, 400, 500, 600, 700, 800, 900]
num1 = 5
result = True
FILE
"""
# For adding the more details(description) in this help command of mod1 go to the actual mod1 file and add some docstrings. By the use of Docstring we can add any information by initialize it on starting. And by use Strings """.....""" any infor of any place inside function can be stored
"""
Help on module mod1:
NAME
mod1
DESCRIPTION
# Docstring:- This Module Contains Binarty Search Implementation
# Docstring command is description of that particular module
FUNCTIONS
binary_search(l, key)
factorial(num)
DATA
key = 100
l = [100, 200, 300, 400, 500, 600, 700, 800, 900]
num1 = 5
result = True
FILE
"""
help(mod1)
#package:- Packages is nothing but python directory
__init__.py
# So now this folder is bocome responsible for python directory