…DANE CIAŁA NIEBIESKIEGO") name = input("Nazwa: ") while True: try: mass_str = input("Masa w kg (np. 5.972e24): ") mass = float(mass_str) if mass <= 0: print("Masa musi być dodatnia!") continue break…
…# Rozpocznij rysowanie orbity planet.pendown() theta = 0 while theta <= 2 * math.pi: r = a * (1 - e**2) / (1 + e * math.cos(theta)) x = r * math.cos(theta) y = r * math.sin(theta) planet.goto(x, y)…
…= [] # Tutaj zbieramy reszty number = decimal_number while number > 0: remainder = number % 6 # Pobierz ostatnią cyfrę w bazie 6 digits.append(str(remainder)) number = number // 6 # Usuń tę cyfrę #…
…najpopularniejszych: if # jeśli else # w przeciwnym razie while # podczas gdy for # dla return # zwróć print # wydrukuj def # definicja funkcji od angielskiego definition class # klasa import #…
…is return None def for lambda try True del from nonlocal while and elif global not with as else if or yield break except import pass Przykłady poprawnych nazw zmiennych: orbital_velocity = 7.8 #…