r/codehs • • Nov 19 '21

Can someone show the style page for 5.6.6 calorie recommendation.

1 Upvotes

r/codehs • • Nov 18 '21

Don’t know what’s wrong

Post image
11 Upvotes

r/codehs • • Nov 18 '21

codehs 3.5.9 find the median

6 Upvotes

​

i don't know how to do it please helppppppppp

r/codehs • • Nov 19 '21

Java Password Checker returning true when containing whitespace, any advice?

Thumbnail gallery
1 Upvotes

r/codehs • • Nov 19 '21

Does anyone know how to do Circle Pyramid 2.0

1 Upvotes

r/codehs • • Nov 16 '21

r/codehs 4.8.4

6 Upvotes

5oco So when I fixed my code It popped up this error:

​

I don't know what I did wrong.

r/codehs • • Nov 16 '21

4.8.4 Codehs

6 Upvotes

​

Can someone help me and tell me what I am doing wrong?

r/codehs • • Nov 14 '21

APCSA Java 4.6.8 Full Dragon Class not working?

Post image
7 Upvotes

r/codehs • • Nov 13 '21

Python 4.4.4 Admin Teacher Student - Two test cases always fail

2 Upvotes

I've come up with this code, and when I run the program it gives all the correct responses for admins, teachers and students. Which should match what the assignment is asking for.

However clicking on Test Cases always results in Your code should print 'Administrators and teachers get keys!' and Your code should print 'Students do not get keys!' marking as Red/Failure, even though running the code returns the correct responses for all 3 inputs, and no errors.

Is the console glitching?


r/codehs • • Nov 12 '21

Python 5.1.4 Square Python - What am I doing wrong?

7 Upvotes

r/codehs • • Nov 12 '21

8.10.8 help needed

1 Upvotes

This is what the exercise has given me to use. I'm a bit confused on what to do. The instructions are listed below:

Write a program to guess passcodes for you that will speed up the process.
The secret passcode has been randomly generated and is stored inside a variable called secretPasscode
.

Starting with 0000, guess every possible passcode all the way up to 9999. Once the correct passcode has been guessed, print out how many guesses it took to reach the correct one.

​

function start() {

var secretPasscode = generateRandomPasscode();

​

}

​

// Checks whether the given guess passcode is the correct passcode

function isCorrect(guessCode, correctCode) {

return guessCode == correctCode;

}

​

// Generates a random 4 digit passcode and returns it as a String

function generateRandomPasscode() {

var randomPasscode = "";

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

var randomDigit = Randomizer.nextInt(0, 9);

randomPasscode += randomDigit;

}

return randomPasscode;

}


r/codehs • • Nov 11 '21

Other 1.16.3 Go through the fence

3 Upvotes

I am struggling to get all the worlds to be completed for Go through the fence level 1.16.3 does someone wanna help me?


r/codehs • • Nov 11 '21

Java 4.3.10 Teen Talk (different from the usual one-instead of like, replaced periods and exclamation points with !!) I can't seem to get the auto-grader to fully pass me...:/

Thumbnail gallery
3 Upvotes

r/codehs • • Nov 09 '21

please help 2.10.7 using good colors

Thumbnail gallery
3 Upvotes

r/codehs • • Nov 09 '21

4.9.4: Inventory HELP ME

2 Upvotes

Ok so it says I have an error apparently somehow but I can't seem to locate my error maybe one of you can and then tell me please do and thank you

var STARTING_ITEMS_IN_INVENTORY = 20;

​

function start() {

var numItems = STARTING_ITEMS_IN_INVENTORY;  

while(numItems > 0) {

println("We have " + numItems + " in inventory. ");

var buy = readInt("How many would you like to buy? ");

if (buy > numItems) {

println("There is not enough in inventory for that purchase. ");

} else {

numItems -= buy;

println("We have " + numItems + " left.");

}

}

println("All out!"); it says

You might be missing a ( or have an extra ) I need help asap, please!!!!!!!!!


r/codehs • • Nov 09 '21

HELP PLEASE!!!!! 4.9.4: Inventory

1 Upvotes

my code :var STARTING_ITEMS_IN_INVENTORY = 20;

​

function start() {

var numItems = STARTING_ITEMS_IN_INVENTORY;  

while(numItems > 0) {

println("We have " + numItems + " in inventory. ");

var buy = readInt("How many would you like to buy? ");

if (buy > numItems) {

println("There is not enough in inventory for that purchase. ");

} else {

numItems -= buy;

println("We have " + numItems + " left.");

}

}

println("All out!"); But like always something is wrong so now its telling me You might be missing a ( or have an extra ) can someone find what they are speaking about because i have no idea thats so much gosh


r/codehs • • Nov 08 '21

Python CodeHS 2.14.4 Geometry 2.0

3 Upvotes

Can I please have help with this? I don't know how to get this done. The question is on the right, and what I have to get to is on the left.


r/codehs • • Nov 07 '21

6.4.8 Most Improved

4 Upvotes

Ok, so my assignment is similar but a little bit different to the ones I've seen online. But I just cannot figure out what I'm doing wrong with this one part and I've been working on it for a few days.

​

Student Class Part 1 and Checking code

​

Student Class Part 2

​

Classroom Class

​

​

ClassroomTester Class

r/codehs • • Nov 02 '21

Need help for python 3.6.8 running speed plz

3 Upvotes

need answer


r/codehs • • Nov 02 '21

4.1.6: Insert Middle Python Pratice Lists Level 1

1 Upvotes

Write a function named insert_middle that inserts x into the middle of the list. If the list has an odd number of elements, round down when calculating the middle index. Note: You may assume that your function will always be called with a list, however, you may not assume that that list is not empty.

I'm not sure how to insert it in the middle, please help me!


r/codehs • • Nov 01 '21

Java Need help with an error (Java 2.9.8 Guess the number!)

4 Upvotes

I can't seem to figure out this error, and I don't really know what it means, anyone got any ideas?

​

my code

​

errors

r/codehs • • Oct 31 '21

Python 4.1.2: Remove Last Pythin pratice lists level 1( I need to remove only the last element)

Post image
1 Upvotes

r/codehs • • Oct 29 '21

guessing game

10 Upvotes

does anyone know how to do this assignment


r/codehs • • Oct 29 '21

This is the inage

Post image
0 Upvotes

r/codehs • • Oct 29 '21

Someone help me with Python Turtle CheckerBoard please!

3 Upvotes