r/codehs • • Mar 18 '23

I know this sub is pretty much dead and I wont get answers, but could i get help or know where i could get help in completing "7.0.7 Battleship Part 6: The Battleship Class"?

5 Upvotes

r/codehs • • Mar 02 '23

Python 4.3.10 Transaction | Help

Post image
5 Upvotes

r/codehs • • Jan 13 '23

JavaScript I do not understand why my rollCount won't increase

Post image
5 Upvotes

r/codehs • • Jan 07 '23

Can anybody please tell me what I am missing

Thumbnail
gallery
5 Upvotes

r/codehs • • Dec 12 '22

JavaScript Help?

Post image
5 Upvotes

r/codehs • • Dec 06 '22

Does everyone got any ideas what I'm doing wrong?

Post image
5 Upvotes

r/codehs • • Dec 05 '22

6.4.8 Most Improved

Thumbnail
gallery
5 Upvotes

r/codehs • • Dec 02 '22

Am so lost

Post image
5 Upvotes

r/codehs • • Dec 01 '22

sandbox coding help, javascript graphics

Thumbnail
gallery
5 Upvotes

r/codehs • • Nov 30 '22

does anybody know how to do Target Karel CodeHS on Extra Karel Puzzles? this is on python but i can work with javascript code as well.

Post image
5 Upvotes

r/codehs • • Nov 28 '22

JavaScript This codeHS JavaScript sandbox program for JavaScript Graphics

5 Upvotes

I made this but it sucks, jumping on the second platform is buggy and the jumping is also buggy and when you are jumping you are not actually touching the ground can someone help me fix these I made some workarounds to my problems but I think they can just be fixed in the first place.

The Sandbox program


r/codehs • • Oct 22 '22

5.7.5 Factorial

5 Upvotes

It says I have an infinite loop on line 5, please help!


r/codehs • • May 06 '22

JavaScript 4.2.5 Growing Circle

5 Upvotes

I need some help stopping this timer when the circle is as tall as the canvas. I've tried everything i can think of, but nothing is working. Here's the requirements:

You should write a program that draws a circle of size START_RADIUS in the middle of the screen and then animates the circle growing by INCREMENT every 50 milliseconds.

You should use circle.setRadius() and circle.getRadius().

When the circle covers the whole height, you should stop the timer.

Every time the circle grows by CHANGE_COLORS_AT, you should change to color to a random color. (Hint: you’ll need to use the mod operator %)

Getting and Setting the Radius

getRadius() can be used to find the radius of a circle. It returns an integer. For example, if the program has a blue circle named blueCircle with a radius of 15, blueCircle.getRadius() will return 15. This value can be store in a variable.

The radius of a circle can be updated in a similar manner using setRadius. Using the blueCircle example from above, the radius could be set to 30 with blueCircle.setRadius(30).

here's my code so far:

var START_RADIUS = 1;

var INCREMENT = 1;

var CHANGE_COLORS_AT = 10;

var MAX_RADIUS = getHeight();

var num = 0;

function start(){

setTimer(newCircle, 50);

}

function newCircle(){

var color = Randomizer.nextColor();

var circle = new Circle(START_RADIUS);

circle.setColor(color);

circle.setPosition(getWidth()/2, getHeight()/2);

add(circle);

num = num+1;

if(num%10==0){

circle.setRadius(num/10+INCREMENT);

}

if(circle.getRadius()==(getHeight())){

stopTimer(getHeight());

}

}

Any ideas?


r/codehs • • Mar 09 '22

Can someone please help with 12.3.6 The Rectangle Class, Part 5

Thumbnail
gallery
5 Upvotes

r/codehs • • Dec 21 '21

Please help I've been stuck staring at my screen for hours. 5.4.8 AP Comp Sci A Nitro

Thumbnail
gallery
5 Upvotes

r/codehs • • Nov 23 '21

8.1.5 Manipulating 2D Arrays

5 Upvotes

Can anyone help me with this I'm just not sure what the error message is saying or how to fix it?


r/codehs • • Sep 25 '21

CODEHS

5 Upvotes

I need help on Casting to an int


r/codehs • • Jun 10 '21

I need help with exercise 25.13.4 building a database for codehs in JavaScript

5 Upvotes

r/codehs • • Jun 09 '21

need help with 6.3.5 staircase

5 Upvotes

r/codehs • • Jun 02 '21

3.3.4: Families SQL

5 Upvotes

Need help urgent, please. Ive tried too many times and its not working help. SQL Functions


r/codehs • • May 19 '21

THIS IS SO ANNOYING

5 Upvotes

So my code works and counts the head streaks EXCEPT for when it reaches "Longest streak of heads: 3" instead my code prints out "Longest streak of heads: 6" HELP ME please help me HELP

var NUM_FLIPS = 40;

var Heads = "Heads";

var Tails = "Tails";

function start(){

var flips = flipCoins();

printArray(flips);

longestHeadsStreak(flips);

}

// This function should flip a coin NUM_FLIPS

// times, and add the result to an array. We

// return the result to the caller.

function flipCoins(){

var flips = \[\];

for(var i = 0; i < NUM_FLIPS; i++){

	if(Randomizer.nextBoolean()){

		flips.push("Heads");

	}else{

		flips.push("Tails");

	}

}

return flips;

}

function printArray(arr){

for(var i = 0; i < arr.length; i++){

	println(i + ": " + arr\[i\]);

}

}

function longestHeadsStreak(flips){

var countHeads = 0;

var countTails = 0;

for(var i = 0; i < flips.length; i++){

if(flips[i]=="Heads"){

countHeads+=1;

}else{

countTails+=1;

}

}

println("Longest Streak of Heads: " + countHeads);

}


r/codehs • • May 09 '21

Guidelines

5 Upvotes

Are we not following the only rule now or are there just no mods to enforce people blatantly asking for answers? I feel like it's become common to just see people asking for a solution without showing that they've at least made an effort...


r/codehs • • May 05 '21

Is the Princeton review AP CSA book good? any opinions on this book?

5 Upvotes

Is the Princeton review AP CSA book good?

I've been doing some of the FRQs on this book but they've been quite difficult and very long compared to the past papers. If anyone's used the Princeton review book to study for the AP CSA exam, what are your opinions on it?

Do you think I should continue working on it? or are there anything else that I should be checking for last-minute prep?

ps. I have the exam tomorrow so if you could reply asap that would be great!


r/codehs • • Apr 07 '21

4.4.5 Help

5 Upvotes

years=input("Age:")

citizen= input("Born in the U.S.? (Yes/No):")

residency= input("Years of Residency:")

if years >= str(35) and citizen == "yes" and residency >= str(14):

print("You are eligible to run for president!")

else:

print("You are not eligible to run for president. ")

Getting an error. The program says that my code is not displaying "You are not eligible to run for president" when it does. Help?