Var i,sum,n,count: Integer;
begin
writeln('Введите максимальное число диапазона');
readln(n);
for i:=1 to n do
begin
Inc(sum,i);
Inc(count);
end;
writeln('Кол-во чисел: ',count);
writeln('Сумма чисел равна: ',sum);
end.
var a,b:integer;
Begin
randomize;
a:=random(99);
writeln('Дополните ', a);
read(b);
if (a+b=100) then writeln(':-)')
else writeln(':-(');
end.
<h3>1)</h3>
a = input()
b = input()
answ = ((a*a)+(b*b))
print(answ)
answ = (a**3)*(b**3)
print(answ)
<h3>2)</h3>
r = float(input("Радиус круга: "))
p = 3.14
print(r*r*p)
print(2*p*r)
<h3>3)</h3>
a, b, c = map(int, input().split())
if b >= a <= c:
print(a)
elif a >= b <= c:
print(b)
else:
print(c)
<h3>4)</h3>
<em>не забывай про табуляции</em>
def dog():
out = 0
years = int(input())
if (years <= 2):
out = years * 10.5
return out
elif (years > 2):
while(years != 2):
out += 4
years -= 1
out += 2 * 10.5
return out
def cat():
out = 0
years = int(input())
if (years <= 2):
out = years * 12.5
return out
elif (years > 2):
while(years != 2):
out += 4
years -= 1
out += 2 * 12.5
return out
if __name__ == '__main__':
pet = input()
if(pet == "собака"):
print(dog())
if(pet == "кошка"):
print(cat())
<h3>5)</h3>
со вложенными ничего не придумал
def letdothatprint():
lenght = 5
high = 7
print("* " * lenght) #Just top
while (high != 1):
print((lenght-1) * " " + "*")
high -= 1
if __name__ == '__main__':
letdothatprint()
Рисунок 2, так как в других схемах перевозок между станциями нет (например, CD)
7 больших желтых яблок
все груши большие значит яблок больших 32-17=15
всего плодов 25+17=42 из них 28 желтых значит зеленых 42-28=14
зеленых яблок на 2 больше чем зеленых груш значит яблок зеленых 8 а груш 6
зеленые яблоки все большие значит 15-8=7
ответ 7
Подробнее - на Znanija.com - znanija.com/task/2890036#readmore