First Practicum: Wednesday, October 4th
- Start Time: 9:00 a.m.
- End Time: 9:50 a.m.
- Location: Barnard Hall 103
- The exam will emphasize the Python materials that
we have covered to date. To reinforce your understanding,
it might be helpful to review the labs,
programming assignments, lecture material, interactive textbook
and active learning exercises.
- The Python topics we have covered include data types, turtle graphics,
modules, functions, selection statements, iterative statements,
strings, recursion, lists and files.
- You may bring one 8.5 inch by 11 inch sheet of double-sided notes.
- You may use a computer to develop your answers.
You may only use the internet to access the interactive python textbook,
the online python documentation or previous python programs
that you (or you and your partner) wrote for this course.
- To be successful on the exam, strive to understand the
Python material and be able to use it to solve small problems.
Another List Question
Consider evaluating an n-card poker hand where n can be any integer
that is one or greater. Define a general flush to be any n-card hand
where every card contains the same suit. Complete the Boolean function
below to return whether parameter cards is a general flush.
For example,
- general_flush([[3, 'hearts']]) returns True
- general_flush([[3, 'hearts'], [9, 'hearts'], [6, 'hearts']]) returns True
- general_flush([[3, 'hearts'], [9, 'spades']]) returns False
def general_flush(cards):