fb pixel

Chessboard

Given two integers h and w, you are asked to paint a chessboard of height h and width w.
The input contains two integers h and w separated by a space.
The program should print h rows, which have w integers. The black cells need to be marked with # and white cells need to be marked with ..
Input
3 4

Output
.#.#
#.#.
.#.#
Can you implement this in a single line of code 😎?
 
To check your solution you need to sign in
Sign in to continue