Site icon Analytics4All

Python Project 2 – Lists and conditional logic

Advertisements

For your sections project in the course, I am giving you the code below. You should recognize this as a list.

x = [102, 81, 79, 44, 27]

Your challenge, should you choose to accept it, will be to run this code on your machine or in the test python browser (click on the blue arrow below) 

Try your Python code in the free console

I then want you to

  1. Using a loop and conditional logic, print out each number from the list
  2. Print out whether the number is divisible by 2, 3, or not divisible by either 2 or 3.

Project Answer Notebook Download Available at Course Page below:

Back to Python Course: Course

Solution Video

Exit mobile version