r/codehs • u/Sun_mar7 • Apr 04 '21
r/codehs • u/Trolltollhouse • Mar 06 '21
3.2.2 Tower Builder: Every world works except for #4
Can you help? My daughter is freaking out and I don't know how to help her.
r/codehs • u/NickTheEvilCat • Feb 11 '21
2.17.4: Super Cleanup Karel
Hi all, Can I get help on this, I've been stuck on this for a week.
r/codehs • u/Obvious-Pin-3046 • Jan 27 '21
Java 7.3.6 Traversiny Odds. Its not properly printing the odd numbers as well as i dont know why is has a [] and a , — and also how do i test it in the console.. can someone explain it. Thank you
r/codehs • u/maplewoodian • Jan 25 '21
Can anyone help me with the tic tac toe project, I can't figure out how to determine the winner and how to create the red line to signify the winner of the game?
If you can help please reply or message me it is greatly appreciated if you have any tips!!
r/codehs • u/PigeonPlayz1307 • Jan 19 '21
Python 7.6.10: Part 2, Remove All From String
Thought my logic was correct, other posts and websites said this was right as well.
def remove_all_from_string(word, seg):
while True:
x = word.find(seg)
If x == -1:
break
else:
word = word [:x] + word[x + len(seg):]
return wordprint(remove_all_from_string("bananas", "na"))
r/codehs • u/Beartears12 • Jan 17 '21
For 7.7.4 it says the output doesn’t match the solution
r/codehs • u/ScottNilsson1 • Dec 27 '20
Python Need helpwith 7.5.5 python: contains a vowel
I wrote the code, and it works fine, but whenever I press submit, it just infinitely loads and doesnt submit. Please help!
Code:
contains_vowel = "aeiou"
user_string = input ("Enter a lowercase string: ")
result = "Doesn't contain a lowercase vowel."
for c in user_string:
if c in contains_vowel:
result = "Contains a lowercase vowel!"
break
print (result)
r/codehs • u/FabulousLengthiness3 • Nov 19 '20
Can someone help me with 5.2.8 SchoolClub Codehs. I don't know what I did wrong.
r/codehs • u/Alphaomega1115 • Aug 15 '20
Python 5.3.8 infinite loop
I have a loop problem I can't figure out, the problem is -
Write a program that makes the user guess a particular float. Now, recall that you should not compare floats to determine if they are exactly equal. In this program, the user wins if their guess is accurate to within 2 decimal places. You will have to use round
in your comparison of their guess to your number.
If the user’s guess was too high, you should say so. Similarly, you should tell them if their guess was too low.
and my code is -

and it runs correctly, but when I try and grade it the autograder acts like there's an infinite loop, does anyone see what would cause that?
r/codehs • u/Zxakz • Jun 14 '20
Double Tennis Balls
Anyone one know how to do this? I keep getting stuck on the part where you have to put balls but match all the others to.
r/codehs • u/solarsun55 • Jun 03 '20
8.3.6 Owls
Can someone help me with this code. I have no idea what to do. Thanks.
r/codehs • u/lunaaaaaa77777 • May 23 '20
My collision function doesnt work!
this my code for final project, but i dont get why intersection and checkcollision functions doesnt work.
please someone help!
var char;
var bullet;
var enemy;
var life = 5;
var enemyTimer = Randomizer.nextInt(0,50);
var enemies = [];
function start(){
makeChar();
keyDownMethod(movements);
makeBullet();
setTimer(shootBullet, 30);
addEnemy();
setTimer(makeEnemy, 5);
checkCollision();
}
function makeChar(){
char = new Circle(10);
char.setColor(Color.red);
char.setPosition(getWidth()/2, 430);
add(char);
}
function movements(e){
if (e.keyCode == Keyboard.RIGHT){
char.move(10,0);
}
if (e.keyCode == Keyboard.LEFT){
char.move(-10,0);
}
}
function makeBullet(){
bullet = new Rectangle(5,10);
bullet.setPosition(char.getX(), char.getY());
bullet.setColor(Color.green);
add(bullet);
}
function shootBullet(){
bullet.move(0,-10);
if (bullet.getY() < 0){
bullet.setPosition(char.getX(), char.getY());
}
}
function makeEnemy(){
for (var i = 0; i < enemies.length; i ++){
var b = enemies[i];
b.move(0,5)
b.move(Randomizer.nextInt(-3,3),0);
}
}
function addEnemy(){
setTimer(en,800);
}
function en(){
enemy = new Rectangle(50,50);
var x = Randomizer.nextInt(10, 350);
var y = enemy.getY();
y += 10;
enemy.setPosition(x,y);
add(enemy);
enemies.push(enemy);
}
function intersects(a,b){
return (a.getX() < b.getX() + b.getWidth() && a.getX() + a.getWidth > b.getX() && a.getY() < b.getY() + b.getHeight() && a.getY() + a.getHeight > b.getY());
}
function checkCollision(){
for(var i =0; i < enemies.length; i++){
var en = enemies[i];
if (intersects(char, en)){
println("hi");
remove(en);
i--;
remove(bullet);
}
}
}
r/codehs • u/dbdjjsdhzs • May 22 '20
Idk know why it says that I am not comparing the two rounded variables
r/codehs • u/[deleted] • Apr 30 '20
I have to make a method to replace the last value in the 2D array and I keep getting these errors by the way this is 8.1.5 manipulating 2D arrays
r/codehs • u/UnitedStatesLover • Mar 07 '20



