We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 62ed230 + 610b815 commit 88f5c9fCopy full SHA for 88f5c9f
1 file changed
SimpleAddition/Sum_2_numbers.py
@@ -1,5 +1,26 @@
1
-a=int(input())
2
-b=int(input())
3
4
-Sum=a+b
5
-print (Sum)
+# first lets get 2 numbers to add
+print "enter 2 number to add"
+
+# getting the first number
6
+number1 = raw_input("Ok enter the first number ")
7
8
+# and now the second number
9
+number2 = raw_input("and now the second number ")
10
11
+# finally calculating the addidition of the numbers
12
+# sum = number1 + number2
13
+# seems to be right
14
+# but as the inputs are taken as string we need to type cast them
15
+# that is convert number1 and number2 to integer from string
16
+# so lets do that
17
18
+number1 = int(number1)
19
+number2 = int(number2)
20
+# and now lets calculate the sum
21
+sum = number1 + number2
22
23
+# and now lets print the numbers
24
+print "the addition of the 2 numbers is "
25
+print sum
26
0 commit comments