Skip to content

Commit 21d41d3

Browse files
authored
Add files via upload
1 parent e08ec0d commit 21d41d3

File tree

1 file changed

+200
-0
lines changed

1 file changed

+200
-0
lines changed

PythonBasicGithub.py

Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
#!/usr/bin/env python
2+
# coding: utf-8
3+
4+
# # PythonBasicForGithub1
5+
#
6+
# ## 1)Various Datatypes in Python
7+
# ## 2)Variable & Variable Assignment
8+
# ## 4)Print Formating
9+
# ## 5)Few In-built Functions
10+
#
11+
12+
# ## Learning DataTypes
13+
#
14+
15+
# In[1]:
16+
17+
18+
1+1
19+
20+
21+
# In[2]:
22+
23+
24+
5*6
25+
26+
27+
# In[3]:
28+
29+
30+
10/2
31+
32+
33+
# In[4]:
34+
35+
36+
10%2
37+
38+
39+
# In[5]:
40+
41+
42+
10**2
43+
44+
45+
# In[6]:
46+
47+
48+
10*'str'
49+
50+
51+
# In[7]:
52+
53+
54+
##Chceking Datatypes
55+
type(10)
56+
57+
58+
# In[8]:
59+
60+
61+
type('Hello')
62+
63+
64+
# In[11]:
65+
66+
67+
type(True)
68+
69+
70+
#
71+
#
72+
# ### Strings
73+
74+
# In[16]:
75+
76+
77+
##Strings can be mentioned in both single or double quotes
78+
79+
'Hello'
80+
81+
82+
# In[13]:
83+
84+
85+
"Hello world"
86+
87+
88+
# In[14]:
89+
90+
91+
type('Hello')
92+
93+
94+
# In[15]:
95+
96+
97+
type("Hello world")
98+
99+
100+
# ### Variable Assignment
101+
102+
# In[17]:
103+
104+
105+
##Syntax
106+
#var_name=value
107+
108+
a=10
109+
110+
111+
# In[18]:
112+
113+
114+
type(a)
115+
116+
117+
# In[19]:
118+
119+
120+
a='shantanu'
121+
122+
123+
# In[20]:
124+
125+
126+
type(a)
127+
128+
129+
# In[21]:
130+
131+
132+
## Mathematical Operations with variable Assignment
133+
134+
a=10
135+
b=20
136+
137+
138+
# ## Printing
139+
140+
# In[25]:
141+
142+
143+
print(a+b)
144+
print(a*b)
145+
print(b/a)
146+
print((a+b)+(b-a))
147+
148+
149+
# In[27]:
150+
151+
152+
## Various ways of printing
153+
154+
print('Hello')
155+
156+
157+
# In[28]:
158+
159+
160+
first_name='shantanu'
161+
last_name='Jadhav'
162+
163+
164+
# In[32]:
165+
166+
167+
print("my first name is {} and last name is {}".format(first_name,last_name))
168+
169+
170+
# In[33]:
171+
172+
173+
print("my first name is {first} and last name is {last}".format(first=first_name,last=last_name))
174+
175+
176+
# ## some inbuilt functions
177+
178+
# In[34]:
179+
180+
181+
len('shantanu')
182+
183+
184+
# In[35]:
185+
186+
187+
type(1.0)
188+
189+
190+
# In[42]:
191+
192+
193+
type(['1',2,3,4,'shan'])
194+
195+
196+
# In[ ]:
197+
198+
199+
200+

0 commit comments

Comments
 (0)