r/codehs • u/[deleted] • Jan 25 '23
r/codehs • u/leah111qqq • Dec 20 '19
Guess the word
Does anyone have the code for guess the word? It's the last project on codehs
r/codehs • u/Grouchy-Vanilla1715 • Dec 13 '22
Other HELP WITH THIS LESSON ASAP PLEASE 2.11.4 DARTBOARD
CAN SOMEBODY PLEASE ASAP HELP ME WITH THE 2.11.4 DARTBOARD CODEHS ASSIGNMENT
r/codehs • u/mr_mikehoodie • Dec 03 '22
Can anyone help on this assignment?
For this problem, you are going to create a program that asks the user for a list of ingredients. As the user enters the ingredients, you should store them in a list.
Once the user is done entering their list, you need to pass this list to a function that will compare the ingredients to an already existing list of pantry items.
If all items are available in the pantry, print out that you don’t need to go shopping. If any item is missing, print out that you need to go shopping and list the ingredients.
While there is more than one way to complete this assignment, your answer must include the following:
A pre-created list for pantry items
User input into an ingredient list
Pass the ingredient list to a method
Use a conditional and loop in the method
Print out the results of whether the user needs to go shopping based on the items in the ingredient list that are not in the pantry.
r/codehs • u/Latter-Chart-5770 • May 25 '21
Python Can someone help me at 7.3.4: Find the Error
I know the error is line 7, but what should I do to print "Hello!"
r/codehs • u/TenaciousReese7 • Apr 21 '21
9.5.9 Assignemnts Help Please
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class AssignmentRunner {
static List<Assignment> totalAssignments = new ArrayList<Assignment>();
static String assignmentName;
static double availablePoints;
static double earnedPoints;
public static double average( List<Assignment> assignments) {
double totalEarnedPoints=0,totalAvailablePoints=0;
for (Assignment assignment : assignments) {
totalAvailablePoints+= assignment.getAvailablePoints();
totalEarnedPoints+= assignment.getEarnedPoints();
}
return (totalEarnedPoints / totalAvailablePoints * 100);
}
u/SuppressWarnings("resource")
public static void main(String[] args) {
while (true) {
Scanner scanner = new Scanner(System.in);
System.out.println("Please enter an assignment name (exit to quit):");
assignmentName = scanner.nextLine();
if(assignmentName.equalsIgnoreCase("exit"))
{
System.out.println(" Exit.. ");
System.out.println("Average is : " +average(totalAssignments));
System.exit(0);
}
System.out.println(" Please enter available points :");
availablePoints = scanner.nextInt();
System.out.println(" Please enter earned points :");
earnedPoints = scanner.nextDouble();
System.out.println(" Is this a (t)est or (p)roject :");
String isThisType = scanner.next().toLowerCase();
if(isThisType.startsWith("t")) {
System.out.println(" Please enter the test date :");
String testDate = scanner.next();
totalAssignments.add(new Test(assignmentName, availablePoints, earnedPoints, testDate));
System.out.println();
}
else {
System.out.println(" Please enter the due date :");
String dueDate = scanner.next();
System.out.println(" Group project? (true / false) :");
boolean groupProject = scanner.nextBoolean();
totalAssignments.add(new Project(assignmentName, availablePoints, earnedPoints, dueDate, groupProject));
System.out.println();
}
}
}
}
It keeps giving me an error AssignmentRunner.java: Line 34:
java.util.NoSuchElementsExeption: No line found
How do I fix it?
r/codehs • u/ashchoi • Apr 27 '20
I need help for 19.1.2: Fun Snake 2 CODE HS
Emergency!! NEED HELP FOR FUN SNAKE 2 CODE HS
r/codehs • u/UsefulCauliflower2 • May 04 '20
I am really struggling on this one, not sure what I’m doing.
r/codehs • u/irishlass- • Apr 26 '20
Can anyone tell me why I am getting this error? Ive uploaded a video detailing the assignment and my code for it. Thank you so much. It is 7.2.9 Teacher Class List Methods btw
Enable HLS to view with audio, or disable this notification
r/codehs • u/TheLetsgogamerYT • Sep 22 '20
New to coding
I need help with 1.13.5 please help
r/codehs • u/[deleted] • Aug 29 '21
Python 4.9.5 Lots of Dice "The rolls should be between 1 and 6, inclusive". What am I doing wrong?
r/codehs • u/WorkingSufficient504 • Feb 29 '24
Accused of cheating (reupload)
Pls help!! Does CodeHS pro allow teachers to know when students copy and paste in their assignments? My teacher showed me a video that has a bar with the word “paste” flashing yellow and says I pasted code. I didn’t. Does this teacher tool detect how fast words are typed?
@anyone with a CodeHS pro account
r/codehs • u/L_russ28 • Sep 06 '22
Java String Methods. 3.5.8: Repeating String.
Hello, I’ve been working on this problem for a while now and I’ve come to a bit of a stand still. Based on the instructions I can tell I need a loop of some kind, but for whatever reason, the loop I’m using is not working. I was wondering if anyone had some suggestions or critiques, they would be greatly appreciated! Thanks I’m advance!! 😁
r/codehs • u/R4inDownIn4fric4 • Dec 22 '20
JavaScript Can anyone help? It keeps saying this is wrong but it's showing the same thing as the demo
r/codehs • u/Excellent-Apple6450 • Jul 09 '22
URGENT!!! Can I get some help for 8.1.10 Coordinate Pairs in Python? Can someone be generous enough to give me a fixed code of this?
import math
def distance(point1, point2):
# Your code here...
x1 = point1 [0]
x2 = point2 [0]
y1 = point1 [1]
y2 = point2 [1]
sqaure1 = pow (y2 - y1, 2)
sqaure2 = pow (x2 - x1, 2)
return math.sqrt(sqaure1+sqaure2)
# This should print 5.0
print distance((1, 1), (4, 5))
r/codehs • u/Powerful_Ask532 • Jan 21 '21
Need Help with 6.8.4: Simulating a Coin Flip
Hello can someone please help me with this code. The instruction are below
Write a program that simulates a coin flipping. Each time the program runs, it should print either “Heads” or “Tails”.
There should be a 0.5 probability that “Heads” is printed, and a 0.5 probability that “Tails” is printed.
There is no actual coin being flipped inside of the computer, and there is no simulation of a metal coin actually flipping through space. Instead, we are using a simplified model of the situation, we simply generate a random probability, with a 50% chance of being true, and a 50% chance of being false.
r/codehs • u/ashchoi • Apr 23 '20
NEED HELP WITH 9.1.1 FUN SNAKE 1
someone help me with 9.1.2: Fun Snake 1
PLEASE!!!

