Skip to content

Commit

Permalink
added direct type conversion (codebasics#18)
Browse files Browse the repository at this point in the history
direct datatype conversion at the time of input
  • Loading branch information
Raghav219-si authored Feb 23, 2020
1 parent 7b10130 commit 74dcc4c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Basics/test.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
def sum(a,b):
return a+b

n1=input('enter first number: ')
n1=int(n1)
n2=input('enter first number: ')
n2=int(n2)
print('sum is: ',sum(n1,n2))
n1=int(input('enter first number: '))
n2=int(input('enter first number: '))
print('sum is: ',sum(n1,n2))

0 comments on commit 74dcc4c

Please sign in to comment.