Skip to content

Commit 6061bd8

Browse files
minor changes
1 parent fee424f commit 6061bd8

File tree

8 files changed

+48
-43
lines changed

8 files changed

+48
-43
lines changed

Diff for: 01 intro_to_python/comment.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
#print("hello world") #single line comment
2-
#print("hello world")
3-
4-
'''print("hello everyone")
1+
# print("hello world") #single line comment
2+
# print("hello world")
3+
'''
54
print("hello everyone")
6-
print("hello everyone") #multiple line comment
75
print("hello everyone")
6+
print("hello everyone") #multiple line comment
87
print("hello everyone")
98
print("hello everyone")'''
9+
print("hello everyone")
1010

1111
"""print("hello everyone")
1212
print("hello everyone")

Diff for: 01 intro_to_python/escapeSequence.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# print("hello Aman sir")
2+
# print("hello\nworld") # \n means new line
3+
# print("hello\tworld") # \t means tabular space
4+
25
# print("hello "Aman" sir") #error
36
# print("hello \"Aman\" sir")
47
# print("hello 'aman' sir")
@@ -7,22 +10,20 @@
710
# print('heloo 'aman' sir') #error
811
# print('heloo \'aman\' sir')
912

10-
# print("hello\nworld") # \n means new line
11-
# print("hello\tworld") # \t means tabular space
12-
1313
# print(" 5/7 ")
1414
# print(" 5\7 hii")
1515

1616
# print("5\\7")
1717

1818
# print(" hello\b aman") #\b means backspace
1919

20-
# print("hello Aman Sir!!")
20+
# print("hello Aman Sir")
2121
# print("how are you")
2222

23-
# print("hello Aman Sir!!",end="")
23+
# print("hello Aman Sir ",end="")
2424
# print("how are you")
2525
# print("hello Aman Sir!!",end="\t")
2626
# print("how are you")
2727

28-
print("hello","Aman","ji",sep="-")
28+
print("hello","Aman","Sir")
29+
# print("hello","Aman","Sir",sep="_")

Diff for: 02 variables_and_DataTypes/DataType.py

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
# num3=50
1+
num3=50
22

3-
# print("num3")
4-
# print(num3)
5-
# print('the value of num3=',num3)
6-
# print(type(num3))
3+
print("num3")
4+
print(num3)
5+
print('the value of num3=',num3)
6+
print(type(num3))
77

8-
# num4='A'
9-
# print(num4)
10-
# print(type(num4))
8+
num4='A'
9+
print(num4)
10+
print(type(num4))
1111

12-
# num5=3.167
13-
# print(num5)
14-
# print(type(num5))
12+
num5=3.167
13+
print(num5)
14+
print(type(num5))
1515

16-
# num6=3.167667788788456
17-
# print(num6)
18-
# print(type(num6))
16+
num6=3.167667788788456
17+
print(num6)
18+
print(type(num6))
1919

2020

2121
# #or

Diff for: 02 variables_and_DataTypes/add_user.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
## Adding (string by default)
2-
# num1=input("enter num1 ")
3-
# print(type(num1))
4-
# num2=input("enter num2 ")
5-
# print(type(num2))
1+
# ## Adding (string by default)
2+
# num1=input("enter num1 : ")
3+
# # print(type(num1))
4+
# num2=input("enter num2 : ")
5+
# # print(type(num2))
66
# num3=num1+num2
7-
# print(type(num3))
7+
# # print(type(num3))
88
# print("num3 = ",num3)
99

1010
#Adding integer values
1111
# num=int(input("Enter the first value :"))
12-
# print(type(num))
12+
# # print(type(num))
1313
# num2=int(input("Enter the second value :"))
14-
# print(type(num2))
14+
# # print(type(num2))
1515
# num3=num+num2
16-
# print(type(num3))
16+
# # print(type(num3))
1717
# print("the sum of ",num," and ",num2," is ",num3)
1818

1919
#Adding Float values
20-
# num=float(input("Enter the first value :"))
20+
num=float(input("Enter the first value :"))
2121
# print(type(num))
22-
# num2=float(input("Enter the second value :"))
22+
num2=float(input("Enter the second value :"))
2323
# print(type(num2))
24-
# num3=num+num2
24+
num3=num+num2
2525
# print(type(num3))
26-
# print("the sum of ",num," and ",num2," is ",num3)
26+
print("the sum of ",num," and ",num2," is ",num3)

Diff for: 02 variables_and_DataTypes/complex.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# a=5+2j # j=v-1 (under root -1)
2-
# b=2+3j
3-
# c=a+b
4-
# print("the result is ",c)
5-
# print("Real part ",c.real,"Imaginary part",c.imag)
1+
a=5+2j # j=v-1 (under root -1)
2+
b=2+3j
3+
c=a+b
4+
print("the result is ",c)
5+
print("Real part ",c.real,"Imaginary part",c.imag)
66

77
# eq1= complex(5,8)
88
# print(eq1)

Diff for: 02 variables_and_DataTypes/variables.py

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
# variable is a special type of containers which is used to store the data into them
2+
13
# num=56 #valid name
4+
# print("num")
25
# print(num)
36

47
# num value=54 #invalid name because of space in between
@@ -15,3 +18,4 @@
1518

1619
import keyword
1720
print(keyword.kwlist)
21+
print("there are ",len(keyword.kwlist)," keywords in python")

Diff for: PythonTest.pdf

470 KB
Binary file not shown.

Diff for: pythonTest.docx

24.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)