35 lines
529 B
Plaintext
35 lines
529 B
Plaintext
#
|
|
# ID: 39027b
|
|
# Nazwa: Algorytmy zadanie
|
|
# Opis: Dzisiejsze zadanie domowe na algorytmy ale w Pythonie
|
|
# Publiczny: 0
|
|
# Data utworzenia/ostatniej edycji (UTC): 2023-10-21 10:10:51
|
|
#
|
|
|
|
# a)
|
|
|
|
|
|
|
|
a = 10
|
|
|
|
b = 15
|
|
|
|
|
|
|
|
allNums = list(range(a,b+1))
|
|
|
|
|
|
|
|
result = sum([x for x in allNums if x%2==0])
|
|
|
|
|
|
|
|
print(result)
|
|
|
|
|
|
|
|
# b)
|
|
|
|
|
|
|
|
while True:
|
|
|
|
i = input()
|
|
|
|
try:
|
|
|
|
n
|
|
|
|
except NameError:
|
|
|
|
n = i
|
|
|
|
|
|
|
|
if not i:
|
|
|
|
break
|
|
|
|
else:
|
|
|
|
if i > n:
|
|
|
|
n = i
|
|
|
|
|
|
|
|
print(n) |