-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClass1.py
More file actions
122 lines (117 loc) · 1.98 KB
/
Copy pathClass1.py
File metadata and controls
122 lines (117 loc) · 1.98 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
# My first program(Print)
print("I am learning Python")
print("MY name is Muhammad Abubakar")
print("MY Age is 21")
print("MY Father name is Muhammadd Afzal Mughal")
print("MY name is Muhammad Abubakar")
print("MY Age is 21")
print("MY Father name is Muhammadd Afzal Mughal")
#Variable
age=21
print(age)
NAME= "Abubakar"
age=21
brother= "Muhammad AMMAR"
age2=17
print("MY name is",NAME)
print ("MY age is",age)
print("My brother name is",brother)
print("My brother age is",age2)
zubair= "seo master"
moiz="meme master and jugatbaaz"
abubakar= "innocent and loyal"
arham="brother from another mother"
print("zubair is my firend nd he is",zubair)
print("moiz is also my friend nd he is",moiz)
print("but iam muhmmad abubakar nd iam",abubakar)
print("arham is good boy nd he is",arham)
#sum
print(35+34+311)
a=45
b=74
sum=a+b
print(a+b)
# Types of operator
#sum+sub+divide+module etc
a=45
b=74
print(a-b)
print(a==b)
print(a>b)
print(a<b)
print(a/b)
#
a=46
b=536
print(a%b)
print(a*b)
#bool
name="abubakar"
age=21
print(type(age))
print(type(name))
a=False
b=True
print(type(a))
print(type(b))
c=None
#just for practice
print("my name is abubakar")
print ("iam laerning pyhon but it is very difficult for me but iam consist for it ")
a=2364
b=4344
sum=a+b
print(sum)
a=53734
b=5237
sub=a-b
print(a-b)
a=4363735
b=354
diff=a/b
print(diff)
#logical operator
a=43
b=436
sum=a+b
print (a+b)
print(not(a<b))
#OR OPERATOR
a=34
b=537
print ((a==b)or(a<b))
# Types of conversion
#conversion
a=232
b=34.6
sum=(a+b)
print(sum)
#second example
a=4366
b=567.45
sum=(a+b)
print(sum)
a=int("435")
b=32
sum=(a+b)
print(sum)
#input in python
name=input("what is ur name:")
age=input("what is ur age:")
marks=input("what is ur marks:")
print(name)
print(age)
print(marks)
#for practice
#my first program which i have done ..
first=input("enter first:")
second=input("enter second:")
sum= first+second
print(sum)
light="green"
if(light == "yellow"):
print(go)
elif(light=="red"):
print(stop)
else:
print(light is broken)