Skip to main content

Questions tagged [homework]

Questions requesting help with school homework. This tag lets potential answerers know that they should GUIDE the student in solving the problem, rather than showing a complete solution. CAUTION: Before posting, consider that classmates may be tempted to reuse code from your post. (Read the tag wiki.)

Filter by
Sorted by
Tagged with
0 votes
0 answers
44 views

Testing whether parenthesis are correct in a string in functional JS

This is a homework exercise and therefore has no further purpose. The writing to me feels clunky, and the typescript types on addParenthesisFactory are unreadable, ...
Tomer Kandel's user avatar
4 votes
4 answers
1k views

Creating an O(n) algorithm for an array of integers

To avoid plagiarism in my university, I am going to modify the problem. Henry likes to jump from building to building. The heights of each building are given as a list of H numbers. We also number ...
Lesserrafim's user avatar
5 votes
2 answers
191 views

Binary tree struct in C

Its been done to death, but the particular prompt (see Assignment 4) guiding me has strict+simple requirements that lead to a nice reduced environment to critique poor form. The project implements a ...
shea's user avatar
  • 53
10 votes
1 answer
3k views

COBOL Database Program

For a school project I've created a database program in COBOL and now that I'm finished, I have to write a report on the project. As one aspect of the report, we have to discuss whether the product (...
drake14w's user avatar
  • 103
1 vote
1 answer
131 views

Parsing Tokens in a Toy Interpreter

I'm working on a homework writing a toy interpreter. All the expressions in this language are prefix expressions. The language has a lot of lexical tokens and I wrote code as follows: ...
XuanInsr's user avatar
2 votes
2 answers
607 views

Fast OrderBook Implementation - Follow Up

Following up from: Fast OrderBook Implementation Here is the updated version (I've also implemented some extra functionality) ==> Order.hpp <== ...
jpf's user avatar
  • 63
3 votes
2 answers
757 views

Plotting in Python

This is a Part2 to this question where the task was to plot the data that I got from my time measurements. I've never worked with Jupyter Notebooks (ipynb) since ...
I_throw_but_dont_catch's user avatar
4 votes
3 answers
2k views

O(NlogN) sorting algorithms in C++

The following code is my lab which focused on implementing any 3 known sorting algorithms out there. Since the professor gave us a choice to pick any of them and compare their execution time I chose <...
I_throw_but_dont_catch's user avatar
3 votes
2 answers
135 views

Covid Data Base Hash Map in C++

This is a follow up question to Date Checking in C++ I have these two function prototypes: void CovidDB::add_covid_data(std::string const COVID_FILE) ...
I_throw_but_dont_catch's user avatar
6 votes
1 answer
643 views

Crossword puzzle app

I was hoping someone could give me any tips or advice on this program I wrote for my high school class. The point of the program is to create a workable crossword puzzle in the console. If it works ...
Sean Riley's user avatar
4 votes
1 answer
168 views

Perform a permutation on an array in MIPS assembly

I’m currently studying computer science at university and I’d been tasked with writing a MIPS assembly program that performs a permutation on an array. I’m asking here because my code actually worked ...
schuelermine's user avatar
1 vote
2 answers
89 views

Python code that checks the valid phrases in input string

Determine if all the phrases are found within the input string. If they're all found (using distance as a measure of leeway) return True. Else False. Example: input = 'can i go to the bathroom in the ...
Rohit  Sthapit's user avatar
2 votes
1 answer
254 views

Intrusive smart pointer implementation

I have homework in college to implement intrusive smart pointers. ...
Edziju's user avatar
  • 319
6 votes
4 answers
8k views

Printing a Hollow Butterfly pattern

I am a beginner to Java and have studied up to loops only. After loops lecture above pattern was given to print as homework. I have successfully managed to print this pattern with following code: <...
Strange Alchemist's user avatar
5 votes
2 answers
782 views

Rock Paper Scissors, Player vs Computer

I was given for homework to make a rock paper scissor game where I input my choice as a string either: "@" for rock, "[]" for paper or "X" for scissors. The computer ...
pi4aga's user avatar
  • 53
2 votes
2 answers
192 views

Algorithm that prints day, when submitted date

I would love to know your opinion about this algorithm that we wrote in class. I was thinking about how I can optimize it (in terms of size of code/complexity) without using library functions (...
Adrian Rudy Dacka's user avatar
6 votes
2 answers
552 views

Function that returns a sequence of numbers [x: sqrt(x_(n-1)^3)] given a start value and a max value

I'd love to get a review of my code, which I've already submitted as homework. I'd like some guidance as to how to write it more DRY-ly: I wrote the whole round, <...
Suman Datta's user avatar
2 votes
1 answer
78 views

ArrayPractice with shifting arrays, generate new arrays populated with even numbers, and more

This is from my second homework assignment in my Data Structures class (in which we use Java), we were simply given the task of filling out the functions shown below (they were empty before) and I was ...
Jackson Kirkpatrick's user avatar
6 votes
4 answers
784 views

CS50 pset1: credit card classification and checksum validation

I wrote the following code for the cs50 pset1 credit and it passes all the checks. However, I think that it is too long (specially the last part) and would like to improve it. I would be very grateful,...
Anastasiia's user avatar
2 votes
1 answer
799 views

Calculating Spearman Correlation from scratch

Over the week, I was assigned to create a function in a Jupyter notebook that satisfies the Spearman Correlation formula without the use of any packages e.g. Numpy, Pandas. Below are the rules of the ...
JdoubleL's user avatar
1 vote
4 answers
470 views

Beginner Python program assignment: calculate the total number of bugs collected in a week using a while loop

Beginning of program assignment has a bug collector input the amount of bugs collected each day of the week then outputs the total number of bugs in a print statement. My professor has forbid us from ...
user avatar
7 votes
4 answers
205 views

Sum and bubble-sort student scores

I am a beginner in C language. I studied all night and did my assignment. But I wonder if there is a more efficient way. The original structure is this. ...
cozy_hn's user avatar
  • 71
2 votes
2 answers
226 views

3 dimensional python battleship game

I have an assignment in a python course. We were instructed to make a 3D Battleships game for 2 players on the same computer. I've written a code that works, according to the assignment instructions, ...
Uri Bertocchi's user avatar
2 votes
1 answer
150 views

Changing the attributes of a file

I wrote a program that changes the attributes of a file. How can I make the program more efficient? Please find program problems. How can I improve the program? ...
Dave's user avatar
  • 51
11 votes
3 answers
1k views

Toggle 2 LEDs using a timer XMEGA-A3BU Xplained

I’m currently taking an online embedded programming course. This was our 4th programming assignment. The device is Microchip(Atmel) XMEGA-A3BU Xplained Development Kit, Mfr. Part Number: ATXMEGAA3BU-...
pacmaninbw's user avatar
  • 23.9k
4 votes
1 answer
3k views

Create and view a family tree

I have an assignment due Friday to make a family tree. Started to code in January. My reviews from the teacher for this code was that the use of pointers was horrendous and it wasn't OOP enough. This ...
Shayeza's user avatar
  • 43
4 votes
1 answer
202 views

Case-insensitive sort in C

I wrote a sorting program so that if the optional argument -i is present then the sorting should be done without taking into account lowercase / uppercase letters. ...
Mike's user avatar
  • 299
3 votes
2 answers
139 views

change file attributes on a Linux file system with chattr

I am reading the book The Linux Programming Interface and I have reached the exercise in which the implementation of the chattr command in C is required. I would ...
Dave's user avatar
  • 51
4 votes
3 answers
453 views

Analyzing baby name data in CSV files

First time using code review. I am still a student so there will be a lot to be desired. Basically as part of the homework we are told what methods to create (Method names are given with their ...
NotReallyOliverTwist's user avatar
2 votes
1 answer
553 views

Implementation of an algorithm to calculate a check digit for a five-digit number

I'm a newbie in programming, just started about 6 months ago and just finding my way around in C# (clean) code. This is the toy task we have received from our teacher. This is what it should do: New ...
miles's user avatar
  • 23
4 votes
4 answers
430 views

Making a list of length X with each cell being a list of length Y

My teacher gave us an assignment to write a function that gets as arguments an x and a y. It returns a list which is of length <...
WalaWizon's user avatar
2 votes
2 answers
2k views

Input validation that verifies a boolean assignment using a Boolean object

Taking online college course and I'm new to Java. We just learned about input validation. I've used input validation pretty comfortably for strings, ints, and whatnot. But I had to validate a boolean ...
Ryan Jones's user avatar
3 votes
1 answer
636 views

ATM Console Program with Java

I am a freshman Computer Engineering student. Variable names are pretty straightforward; I believe it would be easy to understand. Program explanation: First you have to create an account and deposit ...
Yigit148's user avatar
0 votes
2 answers
133 views

Searchable database with Java and SQL

What does the code do? Albeit unfinished (it does work, it's just not complete yet), the code creates a database (members.db) where telephone numbers, IDs, and ...
telometto's user avatar
  • 119
1 vote
1 answer
154 views

Simple school bank project in C++

What is your opinion on this simple school project exercising OOP in C++? ...
milanHrabos's user avatar
2 votes
1 answer
1k views

Java implementation of Employee class hierarchy

We were tasked to do this assignment where there is the base class employee and two derived class part-time and full-time employees. Here is what I came up with: ...
kairodesu's user avatar
1 vote
1 answer
481 views

Java implementation of Yahtzee

I'm trying to implement the game of Yahtzee in java. This is for a project at my university so I tried to be as clean and to use the best code practices as possible. The part in particular that I ...
Andrea Zasa's user avatar
2 votes
2 answers
2k views

A monthly expenses calculator for an assignment

I've been working on this project for a day. Any feedback on the code would be appreciated. The code is for an assignment. The main concern I have with the project is that I'm not using abstract ...
Umsugi's user avatar
  • 25
1 vote
1 answer
111 views

Python module to generate context for Django template using data requested from API

As part of a university assignment, I have been tasked with populating and rendering a provided Django template with COVID-19-related quarantine data retrieved from a government API. To challenge ...
atiabbz's user avatar
  • 15
1 vote
2 answers
102 views

It is considered a daemon if it runs in the background - creating a daemon in C

I created a daemon that creates a fifo file with a default name, then is been blocked waiting for messages on that fifo. When an interactive process writes data to that fifo, the daemon wakes up and ...
Mark's user avatar
  • 449
2 votes
1 answer
401 views

program that implements the `mkdir` command

I wrote a program that creates a directory, similar to the mkdir command. My question is, is this implementation correct? What else could I improve or what problems ...
Mark's user avatar
  • 449
1 vote
1 answer
165 views

What are the issues with implementing the Shortest Job First algorithm?

I wrote a program that implements the Shortest Job First (SJF) scheduling algorithm. The total number of processes is read directly from the standard input, following that for each process to specify ...
Mark's user avatar
  • 449
0 votes
1 answer
347 views

Round Robin algorithm implementation

I wrote a program that implements the Round Robin planning algorithm. The total number of processes is read directly from the input standard, and for each process the arrival time and execution time ...
Mark's user avatar
  • 449
5 votes
1 answer
697 views

Space Invaders clone for a college project

Edit: the project was submitted, and I got a good grade! :D I am finishing up a project for my computer science class. The project is a space invaders clone that uses the JavaFX library to provide ...
puppeteer's user avatar
3 votes
1 answer
1k views

Generate and display usernames

Everything currently works exactly as requested by the instructor, I've included as much possible commented documentation as I can think of to make it easier for people to see what the required ...
SnazzyJoe's user avatar
1 vote
1 answer
855 views

Evaluating infix expression with brackets

My assignment was to write a function that computes the value of an expression written in infix notation. We assume that we are using the four classical arithmetic operations +, -, * and / and that ...
TheUselessProgrammer4's user avatar
3 votes
1 answer
1k views

Monte Carlo Simulation of 7 Card Stud Poker

I've completed this as part of an online programming course (in which code review is supposed to be done by fellow learners, but it's been a very long time and none of them have reviewed this), and ...
John's user avatar
  • 33
4 votes
2 answers
826 views

Read bills from a bills.csv file

I wrote the following code to read out a bill from a file and then putting it into a bills-list. The bill contains: "company", "customer", Year, Month, Day, Amount, "credit/...
huibuh715's user avatar
1 vote
1 answer
440 views

Python Fasta Parser using dictionaries without using BioPython or other external libraries

I am writing my own parser for fasta format. I can't use Biopython or anything else, because it's a part of an assigment and our teacher wants us to try to do it manually. For now, I have done this: <...
CitronWorld's user avatar
2 votes
2 answers
189 views

Java BMI Calculator [closed]

I'm learning java this week. Please reviews my code for BMI calculator using java, need some your feedback. Thanks before! This Assignment: My code ...
lokaloka's user avatar

1
2 3 4 5
12