CS 315
Homework Assignment 1


Assigned:  November 20, 2026
Due:  November 29, 2026, 23:55

List data type in Go, Javascript, Julia, Python, and Ruby

In computer science, a list or sequence is an abstract data type that represents a finite, ordered collection of values. The same value may occur more than once. Lists were a central feature of Lisp, an early functional programming language. Many programming languages provide list types, and some offer dedicated syntax for creating lists and working with their elements.

In programming tasks, you may end up maintaining a list of objects. In this homework assignment, assume that you have to maintain a list of strings; e.g., names of people, cities, etc, in five different programming languages. The programming languages are Go (Golang), Javascript, Julia, Python, and Ruby. You will investigate how the following operations can be done in these programming languages:

  1. Create an empty list.
  2. Initialize a list with some values.
  3. Check whether the list is empty.
  4. Add a new element to the list.
  5. Check whether a specified value occurs in the list.
  6. Remove the first occurrence of a specified value from the list.
  7. For a nonempty list, obtain its head (the first element) and its tail (the remaining elements).
  8. Print all elements in the list.

You may use online compilers/interpreters. For each language, prepare a single source file that demonstrates and tests all eight operations in the order listed above. Write your own examples. Be careful to avoid plagiarism!

Organize all of your experiments and their results and put them into a report. The report should include Parts A, B, and C, as explained below:

Part A - Operations in each language (45 points)

For each language and each operation, give the sample code segments and the results of their execution. You should explain what your example does, and the output, if generated.

Part B - Evaluation (10 points)

Evaluate the five languages in terms of the readability and writability of their list operations. Explain which language you consider best for these operations and why.

Part C - Learning strategy (10 points)

Describe the materials and tools you used and the experiments you performed. Include the URLs of any online compilers or interpreters you used. If general discussions about the languages helped you learn the material, describe them. Complete the assignment independently.

Part D- Sample Codes (35 points)

Each program must run without errors in the environment specified in your report. Include the JavaScript code in the submitted HTML file so that the program runs in a browser.

Submission:

Submission

Upload a single .zip or .rar archive to Moodle before the due date. The archive must contain the following:

  1. Report (65 points). Submit Parts A, B, and C in a single file named ID_lastname_name_report.pdf.
  2. Source files (35 points). Submit the following five files in a folder named Codes. Each file is worth 7 points.
    1. Go - ID_lastname_name.go
    2. JavaScript - ID_lastname_name.html
    3. Julia - ID_lastname_name.jl
    4. Python - ID_lastname_name.py
    5. Ruby - ID_lastname_name.rb

Important Notes: