Repository navigation
Expand file tree
/
Copy pathp1.py
More file actions
179 lines (178 loc) · 3.1 KB
/
Copy pathp1.py
File metadata and controls
179 lines (178 loc) · 3.1 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# print("hello")
# if 5 > 2:
# print("five is greater than two")
# if 6 > 3:
# print("six is grater then tree")
# print("six is grater than tree")
# # this is comment
# # this is comment
# # print hello word
# print("hello word")
# # this is comment
# # more than
# # one line
# '''this is second type '''
# x = 5
# y = "anshu"
# print(id(x))
# print(y)
# x = 6 # x is type of int
# y = "salu" # y is type of now str
# x = str(4) # x will be a '4'
# y = int(3) # y will be a '3'
# z = float(3)
#
# print(x)
# print(y)
# print(z)
# x = 5
# y = "anshu"
# print(type(x))
# print(type(y))
# x = "hello"
# print(x)
# y = 4.9
# print(type(y))
# x = """john
#
# hghhghgh
#
# jhhjhjhjhj
# hjhjhhj
# """
# print(x)
# # double or single quotes lga skte h ans same hota h
# x = "john"
# print(x)
# a = 8
# A = "a and A is different"
# print(id(a))
# b = 8
# print(id(b))
# print(A)
# myvar = "john"
# my_var = "john"
# _my_var = "john"
# print(myvar)
# print(my_var)
# print(_my_var)
# x, y, z, = "orange", "banana", "cherry"
# print(x)
# print(y)
# print(z)
# x = y = z = "akansha"
#
# print(x)
# print(y)
# print(z)
# fruits = ["apple", "banana", "cherry"]
# x, y, z, = fruits
#
# print(x)
# print(y)
# print(z)
# bachche = ["anshu", "goldy"]
# x, y, = bachche
#
# print(x)
# print(y)
# x = "awesome"
# print("python is " + x)
# x = "you are "
# y = "awesome"
# z = x + y
# print(z)
# x = 7
# y = 8
# z = x + y
# print(z)
# x = 8
# y = 10
# print(x + y)
# '''data type'''
# x = "hello word"
# print(x)
# print(type(x))
# y = 8.0
# print(y)
# print(type(y))
# z = 30
# print(z)
# print(type(z))
# a = 1j
# print(a)
# print(type(a))
# b = ["apple", "banana", "cherry"]
# print(b)
# print(type(b))
# c = ("apple", "banana", "mango")
# print(c)
# print(type(c))
# d = range(8)
# print(d)
# print(type(d))
# e = {"name": "john", "age": 20}
# print(e)
# print(e["name"])
# print(type(e))
# f = {"apple", "banana", "apple", "banana", "apple"}
# print(f)
# print(type(f))
# g = frozenset({"apple", "banana", "cherry"})
# print(g)
# print(type(g))
# h = True
# print(h)
# print(type(h))
# i = False
# print(i)
# print(type(i))
# j = b"hello"
# print(j)
# print(type(j))
# k = bytearray(5)
# print(k)
# print(type(k))
# l = memoryview(bytes(6))
# print(l)
# print(type(l))
# '''python number'''
# x = 1 # int
# y = 74998504 # float
# z = -7499 # complex
# print(type(x))
# print(type(y))
# print(type(z))
# print("hello")
# print('hello')
# b = "hello, world"
# print(b[2:5])
# b = "hello, World"
# print(b[:5])
# #: k bad kitna no bolo usko chhod k aage print krega
# b = "hello , World"
# print(b[1:])
# b = "hello , World"
# print(b[-5:-3])
# a = "hello , World"
# print(a.upper())
# a = "HELLO, WORLD"
# print(a.lower())
# a = " hello,World "
# print(a.replace(" ", ""))
#
# # print(a.strip())
# # what is the difress bitween normal and this type
# a = "hello , World"
# print(a.replace("h", "j"))
# # does't work
# a = "hello , World"
# print(a.split("h"))
# a = "hello"
# b = "world"
# c = a + b
# print(c)
for row in range(15):
print(f"{row};;;;;;",row%5)
if row%5 == 0:
print(row)