-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIntroduction
More file actions
53 lines (31 loc) · 1.36 KB
/
Copy pathIntroduction
File metadata and controls
53 lines (31 loc) · 1.36 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
// Download Python : https://www.python.org/downloads/
// Download PyCharm : https://www.jetbrains.com/pycharm/download/#section=windows
// After Installing and opening Python IDE,
// Basic mathematical operations like +, -, *, /, %, //, ^, **
// These will work directly irrespective of synatx or skeleton of java in the compiler.
10//3 output is 3 (integer division)
2*2*2*2 is also written as 2**4 output is 16
10/3 output is 3.33333333335 (actual division)
10%3 output is 1 (remainder)
// We can use some pre-defined fuctions or own functions to code
print('python') output is python
just simply 'python' output is 'python'
use " " for group of strings or characters
example : "python's code"
print("hello world")
output: 'hello world'
the string part must be different from outside part
example : print('"python" code') here python is highlited
output is "python" code
but when u want to print ram's and highlighted one
we use \ backslash which will ignore the special character next to it.
print('ram\'s "python code"')
output is: ram's "python code"
// print python 5 times
5*'python'
output: pythonpythonpythonpythonpython
print('c:\docs:\navin') // here \n has new meaning it will move to new line
output: c:\docs:
avin
print(r'c:\docs:\navin') // here r means raw string...it will consider whole thing as one and do
output: c:\docs:\navin