print()
?vysledek = print("Ahoj světe")
print(vysledek)
input()
?jmeno = input("Napiš své jméno: ")
print(jmeno)
len()
?delka = len("Petra")
print(delka)
cislo = 20
for cislo in range(5):
print(cislo * "♫ ")
cislo = cislo + 1
print("V proměnné cislo je uložena hodnota: ", cislo)
for cislo in range(5):
print(cislo * "♫ ")
promenna = "X"
for j in range(5):
for i in promenna:
print(i, i, i, i, i)
for j in range(5):
print('X ' * 5)
for radek in range(6):
if radek == 0:
for obsah_radku in range(6):
print('X', end=" ")
print()
elif radek == 5:
for obsah_radku in range(6):
print('X', end=" ")
print()
else:
print('X', end=" ")
print(' ' * 7, end=" ")
print('X', end=" ")
print()
for radek in range(6):
if radek == 0 or radek == 5:
print('X ' * 6)
else:
print('X ', ' ' * 6, 'X')
for radek in range(6):
for sloupec in range(6):
if radek == 0 or sloupec == 0 or radek == 5 or sloupec == 5:
print('X', end=' ')
else:
print(' ', end=' ')
print()
for row in range(5):
for col in range(5):
print(row * col, end=" ")
print()
(někdo se trochu nudil)
for row in range(10):
for col in range(10):
result = row * col
if result > 9:
print(result, end=" ")
else:
print("", result, end=" ")
print()
Napiš program, který vypíše čísla od jedné do 100, ale:
for num in range(1, 101):
if num % 15 == 0:
print("bum-bác", end=', ')
elif num % 5 == 0:
print("bác", end=', ')
elif num % 3 == 0:
print("bum", end=', ')
else:
print(num, end=', ')
print ()
ale print()