Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- x= raw_input("qual o primeiro numero?")
- y= raw_input("qual o segundo numero?")
- cont =0
- for p in x:
- if p=='0':
- cont =cont+1
- else:
- break
- n1=x[cont:]
- cont=0
- for p in y:
- if p=='0':
- cont =cont+1
- else:
- break
- n2=y[cont:]
- cont=0
- if '.' in n1:
- for p in n1:
- if p=='.':
- break
- else:
- cont=cont+1
- n1=n1[:cont]
- cont=0
- if '.' in n2:
- for p in n2:
- if p=='.':
- break
- else:
- cont=cont+1
- n2=n2[:cont]
- n1=int(n1)
- n2=int(n2)
- print(n1+n2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement