MacSG

114-Final-3

May 17th, 2015
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. height = int(input("Enter height: "))
  2. width = int(input("Enter width: "))
  3.  
  4. #outer loop for row
  5. for i in range(height):
  6.     #inner loop for column
  7.     for j in range(width):
  8.         if i % 2 == 0:
  9.             print('* ', end='')
  10.         else:
  11.             print(' *', end='')
  12.     print()
Advertisement
Add Comment
Please, Sign In to add comment