1) Створи узор із горизонтальних ліній. 2) Створити узор у клітинку 3) Створити узор на половинках полотна 4) Створити узори на четвертинках екрану Очень
import random chuslo = [random.randint(0,500) for x in range(1000)] five = [] for i in chuslo: if i %5==0: five.append(i) five.sort() five.reverse() print(five)
Var InFile, OutFile: text; // Вводной и выводной файлы Var a,b,c, D, Result : Integer; Assign(InFile, "C:\kvur.txt"); Assign(OutFile, "C:\korni.txt") Reset(InFile) Read(InFile,a) Read(InFile,b) Read(InFile, c) D = sqr(b) + 4*a*c if D = 0 then Write("Уравнение не имеет корней") Else Append(OutFile) Result:=(-b + sqrt(D)) / 2 * a Write(OutFile,Result) Write("Корень уравнения") WriteLn(Result) if (D>0) then Result:=(-b - sqrt(D)) / 2 * a Write(OutFile, Result) Write("Второй корень уравнения") Write(Result) End; End.
chuslo = [random.randint(0,500) for x in range(1000)]
five = []
for i in chuslo:
if i %5==0:
five.append(i)
five.sort()
five.reverse()
print(five)
[500, 500, 500, 495, 495, 495, 490, 485, 485, 480, 475, 470, 470, 470, 470, 465, 465, 460, 460, 460, 460, 455, 455, 455, 450, 450, 450, 450, 445, 440, 440, 435, 430, 430, 425, 425, 425, 425, 420, 420, 420, 420, 420, 415, 415, 405, 405, 395, 395, 395, 390, 385, 385, 380, 380, 375, 370, 365, 365, 360, 360, 360, 360, 355, 355, 355, 350, 350, 350, 345, 340, 335, 330, 330, 330, 330, 325, 325, 325, 320, 320, 315, 315, 315, 310, 310, 310, 310, 305, 305, 295, 295, 290, 280, 280, 280, 275, 275, 275, 275, 270, 260, 260, 255, 245, 240, 235, 230, 230, 225, 220, 220, 215, 215, 210, 210, 210, 205, 205, 205, 205, 205, 200, 200, 195, 195, 195, 190, 180, 175, 175, 175, 175, 170, 170, 160, 160, 160, 155, 155, 150, 145, 145, 140, 135, 135, 130, 130, 125, 125, 120, 120, 120, 110, 105, 100, 100, 100, 100, 95, 95, 90, 90, 85, 85, 80, 80, 80, 75, 70, 70, 65, 65, 65, 60, 45, 45, 45, 35, 30, 30, 20, 15, 10, 10, 10, 10, 0]
Var a,b,c, D, Result : Integer;
Assign(InFile, "C:\kvur.txt");
Assign(OutFile, "C:\korni.txt")
Reset(InFile)
Read(InFile,a)
Read(InFile,b)
Read(InFile, c)
D = sqr(b) + 4*a*c
if D = 0 then
Write("Уравнение не имеет корней")
Else
Append(OutFile)
Result:=(-b + sqrt(D)) / 2 * a
Write(OutFile,Result)
Write("Корень уравнения")
WriteLn(Result)
if (D>0) then
Result:=(-b - sqrt(D)) / 2 * a
Write(OutFile, Result)
Write("Второй корень уравнения")
Write(Result)
End;
End.