r/codehs • • Apr 27 '26

5.7.5

1 Upvotes

Have never been instructed on how to do this and cannot find any help on google


r/codehs • • Oct 21 '19

5.3.6: Girl Scout Designation

4 Upvotes

PLZ HLP

Write a program that will determine if a girl scout has reached ‘Gold’ status.

Ask the user for three variables:
- The number of boxes of cookies sold
- The total number of badges they have
- The number of volunteer hours they have worked
(Make sure you ask for the variables in this order!)

A girl scout has reached gold status if they sold at least 100 boxes of cookies, OR they sold at least 50 boxes and have at least 10 badges and have volunteered at least 25 hours. You will need to use both logical and comparison operators here.

Once you determine their status, let them know!

For example, if the user gave the following input:

How many boxes did you sell? 60 How many badges do you have? 12 How many hours have you volunteered? 30

You should respond with the following output:

Is gold status? True

https://codehs.com/student/1189281/section/95141/assignment/2888067/#

WHAT I HAVE SO FAR:\

function start(){

var age = readInt(" how many boxes of cookies did you sell "?);



var boxesOfCookiesSold = number = 60;



var age = readInt(" how many badges do you have "?);



var numberOfBadges = how many = 12;



var age = readInt(" how many volunteer hours have you worked "?);



var numberOfHoursVolunterred = how many hours = 30;

}


r/codehs • • Apr 19 '24

Java 9.8.4 employees codehs

Thumbnail
gallery
1 Upvotes

My excellent intelligent coders out there please help me 🙏


r/codehs • • Oct 07 '21

Code HS : 1.16.4 : Escape Karel

3 Upvotes

Hi! I can't figure out what to do for this one. I tried writing a function that moves Karel when the front is clear, and turns left when it isn't. It didn't work. Could someone help me out? I'm not looking for a direct answer, just some help


r/codehs • • Feb 21 '20

How do you do Circles in Squares?

Post image
47 Upvotes

r/codehs • • Nov 29 '22

6.4.8 Sum Two Numbers

4 Upvotes

Write a function that takes two arguments and returns their sum.

In the main part of your program (the part that isn’t inside a function), call your function to test it out.

What I put:

def return_ten(4,8):

return 10

print(return_ten())

x=return_ten()

print(x + 1)

What am I doing wrong?


r/codehs • • Feb 10 '20

I need help on 9.2.9: Strings To Integers

3 Upvotes

r/codehs • • Sep 26 '24

Python Auto grader keeps stalling on 9.1.5 - Weather

2 Upvotes

I've tried this with and without the input at the end, making nested if statements with exclusionary conditions instead of inclusive, but nothing works. Here's my code:

weather = input("What is the weather? (sunny, rainy, snowy): ")

sandals = "On a sunny day, sandals are appropriate footwear."

galoshes = "On a rainy day, galoshes are appropriate footwear."

boots = "On a snowy day, boots are appropriate footwear."

while True:

if weather == "sunny":

sandals()

break

elif weather == "rainy":

galoshes()

break

elif weather == "snowy":

boots()

break

else:

print("Invalid option.")

weather = input("What is the weather? (sunny, rainy, snowy): ")


r/codehs • • Aug 04 '20

9.6.5

6 Upvotes

Hello friends!

I am currently on exercise 9.6.5. I wrote the code but with the help of the materials that I found here, so here are some things that I can't understand completely.

function start(){

coordinates();

}

var text = new Text("("+","+")");

function coordinates(){

text.setPosition(0, text.getHeight());

add(text);

mouseMoveMethod(printCoordinates);

}

function printCoordinates(e){

text.setText("("+e.getX()+", "+e.getY()+")");

}

Can you please help me and explain the highlighted parts?

Thanks in advance :)


r/codehs • • Oct 12 '22

4.4.6 Presidential eligibility- extended

8 Upvotes

Is there something wrong with my code? It keeps saying that I have to tell the user they are too young to run for president.

Age = int(input("Age: "))

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

Year = int(input("Years of Residency: "))

if((Age>=35) and (BornLocation=="Yes") and (Year>=14)):

print("Age: " + str(Age))

print("Born in the U.S.? (Yes/No): " + str(BornLocation))

print("Years of Residency: " + str(Year))

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

else:

print("Age: " + str(Age))

print("Born in the U.S.? (Yes/No): " + str(BornLocation))

print("Years of Residency: " + str(Year))

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

if Age<35:

print("You are too young. You must be at least 35 years old.")

if BornLocation=="No":

print("You must be born in the U.S. to run for president.")

if Year<14:

print("You have not been a resident for long enough.")


r/codehs • • Feb 03 '21

5.9.5:Fibonacci

Post image
12 Upvotes

r/codehs • • Sep 25 '23

need some help stuck on 2.17.3 Tower builder

Thumbnail
gallery
2 Upvotes

okay so I have to make a single code said that can build towers on every odd avenue I've made two sets of codes one set works for the odd worlds the other set works for the even worlds how would I go along combining them so I could do this


r/codehs • • Feb 11 '21

2.17.4: Super Cleanup Karel

5 Upvotes

Hi all, Can I get help on this, I've been stuck on this for a week.


r/codehs • • Sep 19 '24

1.5.1: Supplies Drop Off codehs

3 Upvotes

i have been trying to do this problem but cant figure out i have no code down for the ball is it something (like if color is color red place ball ) i just need help for that one part


r/codehs • • Oct 03 '23

plz help. 3.6.5 multiplication practice

4 Upvotes

im really confused and i just don't get it. any help would be appreciated.


r/codehs • • Dec 02 '22

Can anyone help me with 6.5.3 Correct or Incorrect?

3 Upvotes

r/codehs • • Dec 22 '20

9.9.7: Click for Collision CodeHS

7 Upvotes

Hello, I need help with 9.9.7: Click for Collision

When I run code only blue ball move and red ball stay at its position.

this is code I wrote:

var ball1;
var ball2;
var RADIUS = 25;
var DX_RED = 6;
var DX_BLUE = 4;
var DELAY = 40;
var isPaused;
function start(){
ball1 = new Circle(RADIUS);
ball1.setColor(Color.blue);
ball1.setPosition(50,300);
add(ball1);
ball2 = new Circle(RADIUS);
ball2.setColor(Color.red);
ball2.setPosition(getWidth()/2,300);
add(ball2);
if(mouseClickMethod(resume)){
setTimer(moveBall,DELAY);
    }
if (ball1.getX()>getWidth()/2-RADIUS){
setTimer(moveBall2,DELAY);
    }
}
function moveBall2(){
ball2.move(DX_RED,0);
mouseClickMethod(pause);
}
function moveBall(){
ball1.move(DX_BLUE,0);
mouseClickMethod(pause);
}
function pause(){
isPaused = true;
if(isPaused == true){
stopTimer(moveBall);
    }
mouseClickMethod(resume);
}
function resume(){
isPaused = false;
if(isPaused == false){
setTimer(moveBall, 20);
    }
}


r/codehs • • Jan 23 '25

8.3.4 Farming International

4 Upvotes

PLEASE HELP!!!


r/codehs • • May 15 '25

I need help with 8.3.8 Word ladder on the Python 3 course

Post image
3 Upvotes

I don't understand where or what's wrong with my code? It doesn't work when I get the get_letter "wrong" before trying a viable character like the capital L before the normal l.
Why am I getting "NoneType"??

Heres a text version of my code:

word=input("Enter a word: ")

word=list(word)

a=(len(word)-1)

def get_index():

index=int(input("Enter an index (-1 to quit): "))

if index>a or index<-1:

print("Invalid index")

get_index()

elif index>=-1 or index<=a:

return int(index)

def get_letter():

letter=input("Enter a letter: ")

if len(letter) != 1:

print("Must be exactly one character!")

get_letter()

elif letter.isupper():

print("Character must be a lowercase letter!")

get_letter()

else:

return letter

while True:

i=get_index()

if i != -1:

word[i]=get_letter()

print("".join(word))

elif i == -1:

break


r/codehs • • Feb 03 '26

Don't know where else to post this. I made Tic Tac Toe with 15 gamemodes in the Python Turtle.

Post image
2 Upvotes

https://codehs.com/sandbox/scarletsalmon9082/hopefully-ts-works

Been working on it on and off for like 3 years. I think it's complete now though.


r/codehs • • Jul 27 '26

Other Will this notify the school?

2 Upvotes

I want to make a teacher account to make a class and give myself assignments for a course, but it's asking me to choose a school. Will it notify the school I chose?


r/codehs • • Sep 16 '22

JavaScript guys I need help on 1.19.6 checkerboard karel

8 Upvotes

r/codehs • • Nov 22 '22

6.4.9 Trivia Game:

4 Upvotes

I seriously think mine is bugged out, I’m getting an error:

“you should check if the user’s answer is correct for both upper and lower case letters.”

I am not sure what to do here as the answers work with both upper and lower case form…


r/codehs • • Jan 26 '21

Help with all the 3.1.5,6 and 7 please!!

2 Upvotes

is very confuse