-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlec 7.py
77 lines (53 loc) · 1.09 KB
/
lec 7.py
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
#Genric programing
#DRY - Dont Repeat Yourself
# - Reusability
# maintablity
#Function - reusable
'''
def function_name():
name = input("Enter Name :")
print(name) #this is not excute untill you call them
function_name() #this is function call
'''
#
'''
def Button():
button =input('Enter button no :')
print(button)
Button()
def Button2(a,b):
print("Sum :",a+b)
Button2(50,50)
Button2(10,20)
'''
#return
'''
def Button():
button =input('Enter button no :')
print(button)
Button()
def Button2(a,b):
#print("Sum :",a+b)
return(a+b)
result = Button2(50,50)
print(result)
'''
#share another file code using import:
'''
import Loops #or import Loops as Lop <- you can use this
Loops.Button() #content comes here from Loops file
#partial Loading(import only specific sentences)
#e.g from Loops import Button1,Button2
#OR
# import Loops * #<-import all functions
'''
#import and pip install
'''
import os
import time
#print(dir(os))
import requests
#print(dir(requests))
import jupyter_requests
print(dir(jupyter_requests))
'''