PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# dev@brattham.se (2021-09-22) v1.0
"""Test 'try' with multiple 'except'.
The code sum inputed values, multiply it by 1O if no EOFError, else 1000, \
and print the result, if no ValueError or IndexError exception occurs.
Input a new integer on every line (follwed by enter). \
Stop input by input q.
For example in SL CodePlayground, test with:
---
no value
---
q
----
1
2
3
---
1
2
3
q
"""
c = 0
try:
while True:
s = input(">> ")
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run