2021-11-04
Max. 25 points
Name:
Task | Max. | Achieved |
---|---|---|
1 | 6 | |
2 | 2 | |
3 | 2 | |
4 | 5 | |
5 | 10 | |
Sum | 25 |
x = 5
y = 2 * x**2 + 2 * x - 6
print(y)
n = 10
d = 6
work = True
while work:
if n / d == 0:
print (d)
work = False
d -= 1
s = "Programming is great fun"
print (s[3], s[-2])
for
loop as while
loop.
for i in range(0, 10, 3):
print(f'{i} * {i} = {i * i}')
i = 0
while i < 10:
print(f'{i} * {i} = {i * i}')
i += 3
n = int(input('Enter an integer: '))
total = 0
for i in range(1, n // 2 + 1):
total += i * 2