Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Status/Day 9.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,27 @@ printValue("3","4") #7
sum = lambda s1,s2 : int(s1) + int(s2)
print(sum("10","45")) # 55
```
**Solution by VK: Python 3**

```python
def ConvertStrAndSum():
counter = 0
while counter == 0:
try:
value = input('Enter 2 value to sum it\n').split()
x, y = value
try:
x, y = int(x), int(y)
counter += 1
return x + y
except ValueError as err:
print(err)
except ValueError or UnboundLocalError as err:
print(err)

print(ConvertStrAndSum())
```


---

Expand Down