-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path10th.PY
More file actions
123 lines (91 loc) · 1.96 KB
/
Copy path10th.PY
File metadata and controls
123 lines (91 loc) · 1.96 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# main=is a global scope and scope is function's boundry.
# def add(num1,num2):
# return(num1+num2)
# def sub(num1,num2):
# return(num1-num2)
# def mul(num1,num2):
# return(num1*num2)
# def div(num1,num2):
# if num2==0:
# print('infinite')
# else:
# return(num1/num2)
# def main():
# num1=int(input('enter the num 1: '))
# num2=int(input('enter the num 2: '))
# print(add(num1,num2))
# print(sub(num1,num2))
# print(mul(num1,num2))
# print(div(num1,num2))
# main()
# def per(sub1,sub2,sub3):
# return(sub1+sub2+sub3)/300*100
# def main():
# sub1=int(input('enter marks of sub 1: '))
# sub2=int(input('enter marks of sub 2:'))
# sub3=int(input('enter marks of sub 3: '))
# print(per(sub1,sub2,sub3),"%")
# main()
# x=1
# while(x<=10):
# print(x*2)
# x=x+1
# def swap(a,b):
# a,b=b,a
# return(a,b)
# def main():
# a=int(input('enter the first value: '))
# b=int(input('enter the second value: '))
# print(swap(a,'first value is:'))
# print(swap(b,'second value is:'))
# main()
#main is starting and ening point of work and main decides how code run.
# x=1
# while x<=10:
# print(x+x)
# x=x+1
# x=2
# while x<=10:
# print(x+x)
# x=x+2
# x=1
# while x<=10:
# print(x*x)
# x=x+1
# x=11
# while x>=1:
# print(x-1)
# x=x-1
# x=0
# sum=1
# while x<10:
# x=x+1
# sum=sum+x
# print(sum)
# x=1
# product=2
# while x<10:
# product=product*x
# x=x+1
# print(product)
# def swap(a,b,c):
# c=(a==b) or (b==a)
# c=a,b
# def main(a,b,c):
# a=int(input('enter the first value: '))
# b=int(input('enter the second value: '))
# c=''
# print(swap(a,b,c))
# main()
def swap(a,b):
temp = a
a = b
b = temp
return a,b
def main():
a = int(input("Enter the first value: "))
b = int(input("Enter the second value: "))
a,b = swap(a,b)
print("a =",a)
print("b =",b)
main()