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
7
votes
4answers
15k views

Getting the largest element in an array using recursion

Any suggestions on how to make this code more efficient? ...
4
votes
2answers
1k views

Program with random number generation

I am having trouble with the random number generator. For week 0 only, I want to set the starting number of roaches in House A (totalRoachesInHouseA) to 97 and the ...
5
votes
4answers
2k views

Database schema for Service Order Management project

I'm a student and I've created this MySQL database schema for my Service Order Management academic project. I want to know if I need to improve it and, if so, how I could do that. ...
8
votes
3answers
17k views

Replace multiple occurrences of a character

I try to replace multiple occurrences of a character with a single character. Input: hhiii!!! hooowww aaareee yyyooou??? Output: hi! how are you? ...
5
votes
2answers
6k views

Decimal To Binary using only the basics

Convert a decimal number to binary using only loops, strings, if/else statements. This is my first C++ project and it took me ...
10
votes
5answers
836 views

Verifying if a car is a sports car based on speed and horse power

I have an assignment where I am required to verify if a car is a sports car or not by minimum max speed and minimum horse power. I have finished the program and it works great. I was just wanting to ...
6
votes
2answers
1k views

Garden sprinkler system

I was given this assignment below and wrote the code below that as the solution. My instructor has been blasting me for writing inefficient code for my last several assignments, and rails at me for ...
7
votes
4answers
443 views

Making this password search more intelligent

In a homework, there is an exercise in which I have a script that is used to search for a password. One of the questions is if is possible to make it "more intelligent", and I'm stuck on it. ...
4
votes
1answer
269 views

Lazy look and say sequence

I have been solving a set of online Clojure problems. One of them involves the look and say sequence. ...
5
votes
2answers
21k views

Cash-withdrawal from an ATM

I'm seeking review comments (design, performance, etc.) based on the problem statement: Write a CashWithDrawal function from an ATM which based on user specified amount dispenses bank notes. ...
5
votes
2answers
4k views

pipe 2 linux commands in C

I am writing a simpel program that can basicly do the same as piping two linux commands can do. For example, ls -l | grep vars.sh, this can be done on the Linux ...
1
vote
1answer
113 views

Function that multiplies all numbers between “a” and “b” with do loop

I'm making a function that multiplies all numbers between an "a" input and a "b" input with do loop. If you please, check my function and say what's wrong since I ...
3
votes
1answer
551 views

python: less ugly solution to the intersection of 3 lines in 3 dimensional space

I've tagged this as homework because it was originally a school project, it was accepted but I'm not satisfied with the code. I've used cramers rule to find the intersection of 3 lines in three ...
4
votes
3answers
3k views

“Consecutive Heads” program

So... I have a program in which I want to flip heads three times in the row. What I'm asking for is for proposals of other solutions for this program, in pro way, as You do in natural sense. That's ...
27
votes
6answers
42k views

Class for measuring distance as feet and inches

My homework question states: Develop a class to measure distance as feet (should be int), inches (should be float). ...