Kurs Python od Podstaw
Nie jesteś zalogowany na forum.
Moje rozwiązanie tabliczki mnożenia:
# zad 5 Wypisz tabliczke mnozenia do 100 (10 x 10)
n = 10
x = 1
while x < n+1:
y = 1
while y < n+1:
if ( x + y ) % 2 == 0:
print(x*y, end=" ")
else:
print(x*y, end=" ")
y += 1
print("")
x += 1
Offline
Moje, trochę inne:
x = 1
while x < 11:
y = 1
while y < 11:
print(str(x*y), end=" ")
y += 1
print()
x += 1
Wiadomość dodana po 21 h 37 min 23 s:
Moje, trochę inne:
x = 1 while x < 11: y = 1 while y < 11: print(str(x*y), end=" ") y += 1 print() x += 1
a właściwie takie same .
Chyba opcja edycji na forum nie działa. Nie mogłem zedytować poprzedniego posta.
Offline
ja to tak nakombinowałem
n=10
x=1
while x<=n:
y=0
while y<n:
if x*(y+1)<10:
print(" "+str(x*(y+1)), end=" ")
else:
print((x * (y + 1)), end=" ")
y+=1
x+=1
print()
Offline