annotate absval/absval.python.txt @ 1:aff6409d16d1 draft

Uploaded
author fubar2
date Fri, 08 Dec 2023 08:47:36 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
aff6409d16d1 Uploaded
fubar2
parents:
diff changeset
1 #raw
aff6409d16d1 Uploaded
fubar2
parents:
diff changeset
2 import sys
aff6409d16d1 Uploaded
fubar2
parents:
diff changeset
3 inp = []
aff6409d16d1 Uploaded
fubar2
parents:
diff changeset
4 for line in sys.stdin:
aff6409d16d1 Uploaded
fubar2
parents:
diff changeset
5 if line.strip() > '':
aff6409d16d1 Uploaded
fubar2
parents:
diff changeset
6 x = line.split()[0]
aff6409d16d1 Uploaded
fubar2
parents:
diff changeset
7 inp.append(str(abs(float(x))))
aff6409d16d1 Uploaded
fubar2
parents:
diff changeset
8 else:
aff6409d16d1 Uploaded
fubar2
parents:
diff changeset
9 break
aff6409d16d1 Uploaded
fubar2
parents:
diff changeset
10 sys.stdout.write('\n'.join(inp))
aff6409d16d1 Uploaded
fubar2
parents:
diff changeset
11 #end raw