Блок схемы для кодов Python (прикрепил задания по порядку)

Роберт2 года в сервисе
Данные заказчика будут вам доступны после подачи заявки
02.04.2023

import math

#--------------------------------------------------------------------------------

print("Задание №1")

w = 3.997

a = ((17**(1/2))*w)/(math.pi*2)

x = a**-1.61

y = x + (a**2 + x**2 +1)**(1/3)

print(f"y = {y}" )

#--------------------------------------------------------------------------------

print("Задание №2")

a = 3.1

x = -4

while x <: <="" p="">

y = x/(math.pi*math.log(a))

z = 3.5**x - math.e**x + (math.cos(y)/math.sin(y))

print(z)

x += 0.5

#--------------------------------------------------------------------------------

print("Задание №3")

t = 1.25

w = 0.32

a = math.cos(w*t-3)

b = math.sin(w*t+3)

if a>b:

y = (a+2)/(b+4)

print("Первая формула")

elif b == a:

y = (a+b)**2

print("Вторая формула")

elif a

y = b

print("Третья формула")

print(f"y = {y}")

#--------------------------------------------------------------------------------

print("Задание №4")

array = [-1, -2, 3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15]

print(f"Исходный массив:\n {array} \n Элементов = {len(array)}")

def FindPositive(array):

first_positive_index = None

last_positive_index = None

for i in range(len(array)):

if array > 0:

if first_positive_index is None:

first_positive_index = i

last_positive_index = i

if first_positive_index is not None and last_positive_index is not None:

array.insert(0, array[first_positive_index])

array.pop(first_positive_index + 1)

if last_positive_index != first_positive_index:

array.insert(0, array[last_positive_index])

array.pop(last_positive_index + 1)

array[0],array[1] = array[1],array[0]

return array

print(f"Результирующий массив \n {FindPositive(array)}")

Заявки фрилансеров