CSCI-UA 102 (Data Structures)

Lab 1: Warm-Up Exercises

Introduction

Welcome to the new semester! Remember programming? Some of you might feel rusty after the long break since the last semester or the last time you worked on code. The exercises that you complete in this lab should serve as a refresher.

You can work on these problems alone, but it may be a good idea to team up with someone else from the class. We learn a lot by talking through problems and explaining them to another person. It is also nice to have support of someone else if you run into problems.

Exercises

Some of you may be familiar with a website called CodingBat. It provides coding problems in Python and Java with live testing. The website tests your code using many inputs. Try to write code solutions to the following problems.

And you do not need to stop with those. CodingBat has many more interesting problems that can serve as a review of the material you should know coming into this class.

Work on these during your first recitation, get help from fellow students and the section leader, visit tutors or office hours, or ask questions on the class discussion forum if you run into problems with any of these exercises. But make sure you try to solve them on your own before asking for solutions.

Have fun!

To get progress and participation credit for this lab, take a screenshot of one or more of your submitted problems showing the test results and submit the screenshot(s) to Gradescope under Lab 1.

If you miss the first week of recitations, you can still submit your lab on your own.