Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- height = int(input("Enter height: "))
- width = int(input("Enter width: "))
- #outer loop for row
- for i in range(height):
- #inner loop for column
- for j in range(width):
- if i % 2 == 0:
- print('* ', end='')
- else:
- print(' *', end='')
- print()
Advertisement
Add Comment
Please, Sign In to add comment