Wyniki dla „UnboundLocalError”

1 wynik

  1. Artykuł Podstawy Pythona

    Funkcje w Pythonie dla początkujących

    …fuel = 100 def burn(amount): fuel = fuel - amount burn(30) UnboundLocalError: cannot access local variable 'fuel' where it is not associated with a value Ponieważ wewnątrz funkcji jest przypisanie do…