Python
Tekst

Podstawowe sposoby przekazywania argumentów, parametry funkcji

Lekcja 27 Moduł 5

def funkcja_2p(liczba_1, liczba_2):
    """Ta funkcja chce liczb"""
    suma = liczba_1 + liczba_2
    print(f"Suma liczb to {suma}.")
    iloczyn = liczba_1 * liczba_2
    print(f"Iloczony liczb to {iloczyn}.")
    srednia = suma / 2
    return srednia

d1 = funkcja_2p(2, 6)
print(d1)

Leave a comment

Comment as a guest:

Name * E-Mail *
Website
Pen