InterviewSolution
Saved Bookmarks
| 1. |
Write a program that creates a list of numbers from 1 to 20 that are divisible by 4. Program to create a list of numbers from 1 to 20 that are divisible by 4 |
|
Answer» divBy4=[ ] for i in range(21): if (i%4= =0): divBy4.append(i) print(divBy4) Output [0, 4, 8, 12, 16, 20] |
|