CSci 227 Syllabus    Resources    Coursework



Laboratory Exercise 7
CSci 227: Programming Methods
Department of Computer Science
Hunter College, City University of New York
Spring 2024


Learning Objectives:

Software Tools Needed: Web browser to access textbook and an IDE (on-line or on computer) with core Python 3.6+ loaded.


Linear Data Types

Today's lab continues our focus on linear data types. Last lab we introduced stacks and linked lists from Chapter 3. For this lab, work through the sections on queues and deques:

Textbook, Section 3.10-3.14: Queues



After working through the textbook sections above, try Program 20: Checkout Lines (also part of classwork for Lecture 7).

Textbook, Section 3.15-3.19: Double-Ended Queues (Deques)



After working through the textbook sections above, try Program 21: Number Converter.

Quizzes and Code Reviews

There are weekly written quizzes and code reviews in 1001G, 11:30-5:30, Mondays-Fridays when classes are in session. No appointments are needed for CSCI 227 students. Make sure to complete Quiz 7 and Code Review 7 by Thursday, 28 March.

Additional Practice

For additional practice on core Python, see the HackerRank prepare series:

HackerRank: Prepare Python

Click the Easy option on the right hand menu, and work through their Python challenges.

For more practice on using stacks & queues to solve problems, here are some popular ones from LeetCode: