cs111

@cs111

Private team

Joined on Sep 20, 2018

  • [Work in Pyret, putting your work in a file called document-code.arr] You might have experience formatting a paper or report that includes headers, paragraphs, bulleted lists, etc, by pressing buttons in a word processor (such as Microsoft Word or Google Docs). You might also have seen that online articles and other websites (including this one!) have different sections and components that are displayed a bit differently. In this assignment, we'll explore two ways that computers can store structured text. Part 1: Parsing HTML HTML, or Hyper-Text Markup Language, is the language that describes websites on the internet. It is made up of content surrounded by tags which follow specific rules and dictate how a website will be displayed when it loads on your screen. A very basic website might have the following html (the output is on the left): Output HTML
     Like  Bookmark
  • From CS111 to CS200 :::success Deadline for spring 2025: August 17th, 2025 11:00pm ::: Note: This page is about taking CSCI 200 after CSCI 111. It does not apply to taking DATA 200. You can take DATA 200 directly after CSCI 111, without doing extra work. This guide tries to help you decide whether going directly to CSCI 200 is right for you. It also contains the bridge problems that you will need to do to get an override approval for CS 200 from whichever professor is teaching it in the semester that you want to take it.
     Like  Bookmark
  • Our final will be on Wednesday, May 14 2pm - 5pm. Salomon DECI Students with SAS accommodations: 2pm onward, location TBA The exam is going to check your conceptual understanding of material from across the course, with emphasis on the material from lists onward, including organization and updating data. We want to check whether you can frame data-facing questions at a high level, choose between the shapes of data for a problem, and design and test programs that change data. What should you expect? The exam will be entirely on paper. You may not use a computer (or phone or any other electronic device, etc) during the exam. The exam will be designed to take an average of about 90 minutes (but you have three hours). That should give enough time for everyone to finish.
     Like  Bookmark
  • Released: Friday, 18 April 2025 Due: Monday, 28 April 2025, 11:59PM EST. Late days are allowed (if you have any remaining) through Thursday, May 1st. Note on TA hours: Although you are allowed to use up to 3 late days on this assignment, TA hours will reduce starting the first day of reading period (April 25). :::info As this is a final project, we expect you to do this largely on your own. TAs will be available to answer conceptual questions and help you talk about design ideas, but you need to do the programming on your own. Most importantly, we will not be helping you debug your code. The posted lecture materials summarize all the operations that you need; Pandas Tutor will help you practice the notation (and you are welcome to ask us questions on how notation from the lecture summaries works). Also, be warned that we will run all submissions through a plagiarism detector, so please do your own work lest you end up before the academic code committee and potentially NC the course. :::
     Like  Bookmark
  • [Work in Pyret, putting your work in a file called filesystem-code.arr] Imagine that you wanted to write programs for managing directories and files on a computer. Each directory has a name and can contain both subdirectories and files. Each file has a name and size. Your goal is to design data structures (Pyret datatypes) to capture files and directory hierarchies, then to write a series of functions that process directory hierarchies (starting from a single "top-level" directory, like a Documents/My Documents folder). As always, you should write tests for your functions. :::danger
     Like  Bookmark
  • CS20 Bridge Assignment: Binary Search Trees [Work in Pyret, putting your work in a file called bsts-code.arr] In class, we saw ancestor trees, in which we linked horses to their parents. The datatype we had for this was: data HorseAncestry: | horse(name :: String, year :: Number, country :: String, mom :: HorseAncestry,
     Like  Bookmark
  • Homework 7: As Memory Serves Due: Friday, April 18th at 11:59 pm Setup Create three files:A document named tracing in which you will answer Tasks A-1 through A-6 (export as a PDF before handing in) hw7_code.py in which you will run the code as instructed in Task-4. You will not hand this in. test_hw7.py which contains your tests (add import pytest at the top of this file) Do not put your name anywhere in your homework files Resources
     Like  Bookmark
  • Homework 6: Python Basics Due: Friday, April 11 at 11:59 pm Setup You should have VSCode set up from the first week of the course. In case you don't, refer to the VSCode Installation and Setup Guide Create a python file called hw6_code.py to include your code. Create a python file called test_hw6.py and put the following lines at the top of that file: import pytest from hw6_code import *
     Like  Bookmark
  • Working with VSCode for CS111 :::warning This guide assumes that you have worked through lab 0 to set up VSCode. ::: Organizing your Files Create a folder on your computer for your CS111 Python work. You can create this within your file explorer, you don't need to do it within VSCode. We recommend that you make a subfolder for each lecture/assignment within the overall folder. You can create those either within VSCode or just within the folder explorer system on your computer.
     Like  Bookmark
  • This lab is an important junction for two reasons: it's where those aiming for 200 should start ramping up to harder problems, and it's our last Pyret lab before we start Python. As a result, this lab is structured with some options for you to choose from. Everyone will do the first set of problems. Further down, you'll see two options: Option 1 (writing functions over lists of datatypes). If you are still getting the hang of writing functions over lists, work on these problems (we will continue to write programs over lists in Python, so this is useful practice). Option 2 (programming over trees). If you are headed to 200, work on Option 2. Those not heading to 200 but who feel comfortable with writing list functions are also welcome to work on option 2. Learning Objectives Explain differences between data structures Choose the correct data structures based on program goals and specifications
     Like  Bookmark
  • Project 2: Cow Maze Craze Deadlines Project Released: Wednesday, March 12, 2025 Design Checks: TBD (Monday, March 17, 2025 and Tuesday, March 18, 2025). Check your email to sign up for a design check with your design check TA. Remember to include your project partner in the Google Calendar invite when scheduling your design check! One group member must submit the design check to Gradescope at least 24 hours before meeting with your design check TA. Ensure both partners are added to the submission. Final Handin Deadline: Friday, April 4, 2025, at 11:59 PM :::success
     Like  Bookmark
  • Submit to: The "Bridge 1: Sorting (2025+)" assignment on the 111 -> 200 Gradescope. Sorting collections of data is a common task in computing. Most programming languages provide built-in operators for sorting. As a programmer, you need to know how to use these functions. As a computer scientist, however, you should understand how these functions work under the hood. There are multiple ways to sort a list. Here, we will look at three different methods. In general, a method of computing the answer to a specific problem is called an algorithm. Below are descriptions of three common sorting algorithms: insertion sort, quicksort, and mergesort. You will implement each one of these algorithms. You may use any of the lists module functions (filter, etc) in your code that you'd like, EXCEPT for the sort function. In each case, the goal is to sort a list of numbers into ascending (increasing) order.
     Like  Bookmark
  • Important notes for shopping period Important dates First day of class: January 22 Midterm quiz: In class (March 19) Final exam: (for people in both S01 and S02): in person, May 14 :::danger The final exam for people in both sections will be in person, without a remote/rescheduled option (except for those students taking the course fully remote or those who have a documented official final exam conflict with another class, with prior permission of the instructor). Please make sure to book your travel after May 14 if you are taking this course. Anyone who is unable to take the exam at the scheduled time must take it with the fall offering.
     Like  Bookmark
  • When: Wednesday, March 19, 2pm-2:50pm, Salomon 001. Those with SAS accommodations and with S02 time conflicts will be contacted. The goal of the quiz is to check your conceptual understanding of working with functions, conditionals, named expressions, tables, and lists. We want to see whether you understand how these constructs work and when to use them. We also want to see whether you can plan an analysis based on tabular data. This is not primarily a coding exam. :::info The exam will cover the material up through lists (Mar 5 lecture). It will not include datatypes, trees, or reactors. :::
     Like  Bookmark
  • In lecture, we have started to write recursive functions, where a function body calls the same function to process a smaller part of the data. This lab gives you practice with understanding how this works and writing recursive functions of your own. In the first part of lab, you'll draw function diagrams on paper to visualize recursive function calls. In the second half, we'll practice writing some recursive programs. Call a TA over if you get confused or need clarification. Resources Lab 6 Presentation Slides Execution diagrams You have seen an example of such a diagram in class and practiced reasoning about it in Drill 15. For a reminder, :::spoiler Execution diagram for list-sum
     Like  Bookmark
  • Homework 5: Much Ado about Lists! Due: Tuesday, March 11th at 11:59 PM. Setup We are not using a stencil/helper code file for this homework! Create a file in Pyret called hw5-code.arr where you will write your Homework 5 solution. Change your context to dcic2024 (you'll need this for task 5) Create a file in your preferred word processor (Google Docs, Word, TextEdit, WordPad, etc) called hw5-src.pdf. This will hold your written work. Do not put your name anywhere in the files.
     Like  Bookmark
  • Oh no! You've been hanging "Missing" posters all over the city streets but can't seem to track down a cow on the loose! You will need to need to scour the internet to find information that can help you find the lost cow. To do this, it helps to know how to search effectively online. This week's lab is designed to help you and your professional cow-whisperer, Jeremy, learn how to do this! In other words, getting stuck and unstuck is part of the point this week, so don't get frustrated. We will be working on searching the Internet for useful and trustworthy sources to get information and debug your code: We'll start with a couple examples of scenarios and potential queries to get you familiarized with what an effective search query looks like. Then we'll apply these skills to write a program that reads from and writes to a file while utilizing Python packages, with a particular emphasis on pandas. Lab Presentation Slides Lab 11 Presentation Slides
     Like  Bookmark
  • In this lab, we will continue with two ideas that we introduced in lecture: understanding how data mutation works and testing functions that mutate data. Resources Lab 10 Presentation Slides An Example of Sharing Data: Collaborative Editing When a program is maintaining data over time, sometimes we want that data to be shared across different parts of the program and sometimes we do not. Decisions about what should or should not be shared affect how we set up our data and write programs. Dataclasses, Examples, and Memory Diagrams Consider a tool (like Google Docs) that allows people to create documents and share them with other people. Here's a basic dataclass for Documents.
     Like  Bookmark
  • Learning Objectives Our goal for lab this week is to get you comfortable with Python syntax, for loops, debugging, and Python's built-in function for sorting lists. If you don't feel confident about any of these topics after your lab session, definitely come to TA Hours! We'd love to help you. :::info We've put a lot of problems into this lab since students will be working through Python at different paces. Don't worry if you don't finish them all. ::: Resources
     Like  Bookmark
  • We've already seen a bunch of datatypes that have been built into Pyret, such as String, Number, Table, and List. We've even used our own custom datatypes, like Coord! By creating custom datatypes, we can describe a piece of data with many components. :::spoiler What is is-___? (and why we prefer cases) In class, we saw the cases notation used to distinguish between variants. When you define a custom datatype, Pyret automatically creates an is-___ function for each variant, that returns True if the input is of that dataclass' type and variant. For example, for the datatype data Tech: | cellphone(type :: String) | laptop(brand :: String, memory-gigs :: Number) end to tell if my-tech-object is a cellphone, we could call is-cellphone(my-tech-object). In most situations (aka for all of the tasks we'll encounter in 111), however, we prefer that you use cases. This is because cases allows you to simultaneously ask which variant a piece of data is, and to assign names to the fields to use in any subsequent computations. cases also gets you in the habit of writing down a computation for every variant of a piece of data, which decreases hard-to-find bugs (for example, forgetting a variant when trying to use is-____).
     Like  Bookmark