Часть 1
1.
a, b, c, d = int(input()), int(input()), int(input()), int(input())
s = (a + b + c + d)/4
print(s)
2.
x, y = int(input()), int(input())
t = x
x = y
y = t
print(x, y, sep = "\n")
4.
from math import pi
L, D = float(input()), float(input())
R = (L - D) / (2 * pi)
print(R)
5.
R1, R2 = float(input()), float(input())
r = R1**2 - R2**2
S = pi * r
print(S)
6.
S = (2*x - y)*(x - y)
Часть 2
x, y = float(input()), float(input())
x, y = y, x
print(x, y)
если нужно найти y = x * 5:
x = int(input())
y = x * 5
print(y)
если нужно найти y = :
y = x ** 5
3.
y = 1 - 2*x + 3*x**2 - 4*x**3
x1, y1, x2, y2 = float(input()), float(input()), float(input()), float(input())
from math import sqrt
S = sqrt((x1 - x2)**2 + (y1 - y2)**2)
Часть 1
1.
a, b, c, d = int(input()), int(input()), int(input()), int(input())
s = (a + b + c + d)/4
print(s)
2.
x, y = int(input()), int(input())
t = x
x = y
y = t
print(x, y, sep = "\n")
4.
from math import pi
L, D = float(input()), float(input())
R = (L - D) / (2 * pi)
print(R)
5.
from math import pi
R1, R2 = float(input()), float(input())
r = R1**2 - R2**2
S = pi * r
print(S)
6.
x, y = int(input()), int(input())
S = (2*x - y)*(x - y)
print(S)
Часть 2
1.
x, y = float(input()), float(input())
x, y = y, x
print(x, y)
2.
если нужно найти y = x * 5:
x = int(input())
y = x * 5
print(y)
если нужно найти y = :
x = int(input())
y = x ** 5
print(y)
3.
x = int(input())
y = 1 - 2*x + 3*x**2 - 4*x**3
print(y)
4.
x1, y1, x2, y2 = float(input()), float(input()), float(input()), float(input())
from math import sqrt
S = sqrt((x1 - x2)**2 + (y1 - y2)**2)
print(S)
#include <cmath>
using namespace std;
void main()
{
int n,sum=0;
float y,k=0;
cin >> n;
int *mass = new int[n];
for (int i = 0;i < n;++i)
{
cin >> mass[i];
}
for (int i = 0;i < n;++i)
{
if (mass[i] >0 )
{
k++;
y=pow(mass[i],2);
cout<<y;
sum+=mas[i]
}
}
system("pause");
}
2)#include <iostream>
#include <cmath>
using namespace std;
void main()
{
int s,p,r,day=0;
cin >> s>>p>>r;
float km=s;
while(r>km)
{
km+=km*p/100;
day++;
}
cout << " km = " << km << " day = " << day << endl;
system ("pause");
}