Lists Challenges 3

  1. Open the data.txt file and put each line into a list

  2. Count the number of numbers greater than 10

  3. Count the number of numbers that are positive

  4. Count the number of numbers that are negative

  5. Count the number of threes

  6. Count the number of numbers that are multiples of five

  7. Count the number of numbers that are even

  8. Count the number of numbers that are odd

  9. Mode (Extra Credit): What is the number that occurs most often in the list?

data.txt contents:

5, -3, 3, 25, 33, 4, 3, -6, 0, 12

4, -4, 8, 26, 20, 4, 6, -10, 0, 10, 2

3

-5, -10, -15, -20, -25, -30, -35, -40, -45, -50

results.txt contents:

All Results for: [5, -3, 3, 25, 33, 4, 3, -6, 0, 12]

Big Count: 3

Positives Count: 7

Negatives Count: 2

Threes Count: 2

Multiples of 5 Count: 3

Evens Count: 4

Odds Count: 6

Mode: 3


---

All Results for: [4, -4, 8, 26, 20, 4, 6, -10, 0, 10, 2]

Big Count: 2

Positives Count: 8

Negatives Count: 2

Threes Count: 0

Multiples of 5 Count: 4

Evens Count: 11

Odds Count: 0

Mode: 4


---

All Results for: [3]

Big Count: 0

Positives Count: 1

Negatives Count: 0

Threes Count: 1

Multiples of 5 Count: 0

Evens Count: 0

Odds Count: 1

Mode: 3


---

All Results for: [-5, -10, -15, -20, -25, -30, -35, -40, -45, -50]

Big Count: 0

Positives Count: 0

Negatives Count: 10

Threes Count: 0

Multiples of 5 Count: 10

Evens Count: 5

Odds Count: 5

Mode: -5


---