Python 3.4
MyProgramming Lab
1. Associate the sum of the non-negative values in the list numbers with the variable sum.
2. Given:
- a variable named "incompletes" that refers to a list of student ids, and
- a variable "student_id"
Write some code that
counts
the number of times the value associated with student_id appears in the list associated with incompletes and
assigns
this value to number_of_incompletes. You may use, if you wish, an additional variable , k.
You may use only k, incompletes, student_id, and number_of_incompletes.
3. A list named parking_tickets has been defined to be the number of parking tickets given out by the city police each day since the beginning of the current year. (Thus, the first element of the list contains the number of tickets given on January 1; the last element contains the number of tickets given today.) Write some code that associatesmost_tickets with the
largest
value found in parking_tickets. You may, if you wish, use one additional variable , k.