I managed to get the pattern I want to print out, but I can't figure out how to convert these into asterisks. I need the pattern to be an asterisk for the 1s and a space for the 0s, in Python
for i in range(5):
for j in range(5):
print(int(j + i + 1)%2, end=' ')
print()
Aucun commentaire:
Enregistrer un commentaire