forked from Akuli/python-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRough.py
More file actions
86 lines (51 loc) · 1.07 KB
/
Rough.py
File metadata and controls
86 lines (51 loc) · 1.07 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
def add(a,b):
print(a+b)
add(1,2)
def wish():
print("hellow")
wish()
def wish(name):
print('hellow {} good morning'.format(name))
wish("Raja")
def squire(number):
print(number*number)
squire(4)
def squire(number):
print('the number of {} squire is {}'.format(number, number*number ))
squire(4)
def add(a,b):
print("The number of {}, number of {} sum is {}".format(a,b,a+b))
add(62,78)
def add(a,b):
return(a*b)
add(5,6)
def evenorodd(a):
if a%2==0:
return("The provided number is a Even value")
else:
return("This is an odd value")
#evenorodd(6)
evenorodd(int(input("enter the value : ")))
def add(a,b):
return(a*b)
result=add(5,6)
print("The sum of add is:", result)
def fact(n):
result=1
while n>1:
result=result*n
n=n-1
return result
for i in range (1,10):
print("factorial {} is {}".format(i,fact(i)))
def calc(a,b):
sum = (a+b)
sub = (a-b)
div = (a/b)
mul = (a*b)
return (sum,sub,div,mul)
w,x,y,z = calc(10,20)
print(w)
print(x)
print(y)
print(z)