j

Program Examples we wrote in class

Week Sept 9 - 13

Week Sept 16 - 20

Week Sept 23 - 27

Week Sept 30 - Oct 4



Week Oct 7 - 11

LOOP WHILE

  • prints hello 5 times
  • prints hello any number of times
  • finds sum of 5 input ints
  • finds sum, product, average of 7 ints
  • finds number of evens among 10 input ints
  • finds average Celsius for 7 days

    Oct 9

  • prints odds, counts odds, finds sum,average, and product of odds among 10 inputs
  • sum and average of evens divisible by 4
  • count positive and negative ints. input terminated by zero
  • prints number of days in the month

    Problems solved in Session B Lab
  • evens divisible by 3 example
  • evens divisible by 3 example with loop terminated by 0

    Oct 14
  • ez pass bridge for any number of people
  • test 2 prep

    Oct 16
  • average grade
  • average of even digits

    Oct 18 - LOOP FOR

  • LOOP FOR
  • LOOP FOR - average of inputs
  • LOOP FOR - grade A
  • LOOP FOR - counts negatives/positives

    Oct 23- LOOP FOR

  • 5 digit number sum of even digits and average of even digits using loop for

    Oct 25

  • loop WHILE - counts negative
  • sum of all divisors - using loop while
  • sum of all divisors - using loop for
  • find the output of the given code
  • finding investment amount

    Oct 28

  • Mini quiz version 1
  • Mini quiz version 2
  • NESTED LOOPS
  • RANDOM NUMBERS - counts the number of zeros, number of -1's, and number of 1's
  • number of students who failed the class (grade below 60) and number of students who got A (grade 95 - 100)

    Oct 30 - NESTED LOOPS

  • what is the output of the following code
  • what is the output of the following code
  • what is the output of the following code
  • prints all prime numbers between 1 and 100
  • perfect number
  • prints all perfect numbers between 1 and N

    FUNCTIONS

  • functions
  • functions
  • functions
  • functions
  • functions
  • functions
  • Nov 6 functions
  • Nov 6 functions
  • Nov 6 functions
  • even odd with functions
  • even odd second solution
  • max, min
  • gross margin max

    One Dimensional Lists

  • sum and average of grades
  • prices above/below 100, max and min
  • expiration date

    test Prep

  • dollar change
  • rectanges
  • ave div by 5 - session B
  • homework
  • enough money example

    Thanksgiving Homework Solution

  • Thanksgiving Homework Solution

    Lists Practice

  • calories/activities example
  • problem 2 from list practice II
  • removing items from list
  • replacing items in the list