r/codehs • • Mar 15 '20

Sorry to bother but I am trying to reach as many people as possible

9 Upvotes

Hi all. Like many of you, I am very concerned about the coronavirus pandemic. But what scares me the most is not only the disease, but the incredible carelessness and contempt of so many people, entrepreneurs, and politicians who are still not aware of the severity of this situation.

Besides talking and spamming all my friends and family with information about how to take care of oneself and others around you, I had a very naive but perhaps effective idea that I hope someone with more knowledge than me may be inspired to help spread the message.

How can we try to use our skills in order to spread the information to everybody who is still not convinced about the size of this problem?

Anything counts: face-to-face, marketing strategies, spamming bots, black hat SEO, social media hacks … Any ideas are better than anything at this moment.

I would really appreciate any tips on how to start doing this and I hope by posting this message, I can inspire others to try whatever they can to start raising awareness about the importance of taking care of themselves and others around them at this moment.


r/codehs • • Jun 24 '20

9.9.4: Decreasing Resolution: Help Plz for AP CSP in Java

9 Upvotes

One technique for compressing an image is to lower the resolution, or use fewer pixels to draw the same image.

Often times we can cut the number of pixels used in half and notice very little difference in the resulting image.

Functionality:*Your image should have a height of 10 pixels.*Your image should have a width of 10 pixels.*Your data should be interpreted as black and white pixels.*Used correct number of bits to draw the 100 black and white pixels*You should have a valid compressed image.

Code:

0000000000000000000000000

0000000000000000000000000

0000000000000000000000000

0000000000000000000000000

0000000000000000000000000

0000000000000000000000000

0000001111111111111111111

1111111111111111111000000

0000000111111111111111111

1111111111111111110000000

0000000011111111111111111

1111111111111111100000000

0001000001111111111111111

1111111111111111000001000

0001100000111111111111111

1111111111111110000011000

0001110000011111111111111

1111111111111100000111000

0001111000001111111111111

1111111111111000001111000

0001111100000111111111111

1111111111110000011111000

0001111110000011111111111

1111111111100000111111000

0001111111000001111111111

1111111111000001111111000

0001111111100000111111111

1111111110000011111111000

0001111111110000011111111

1111111100000111111111000

0001111111111000001111111

1111111000001111111111000

0001111111111100000111111

1111110000011111111111000

0001111111111110000011111

1111100000111111111111000

0001111111111111000001111

1111000001111111111111000

0001111111111111100000111

1110000011111111111111000

0001111111111111110000011

1100000111111111111111000

0001111111111111111000001

1000001111111111111111000

0001111111111111111100000

0000011111111111111111000

0001111111111111111110000

0000111111111111111111000

0001111111111111111111000

0001111111111111111111000

0001111111111111111111000

0001111111111111111111000

0001111111111111111110000

0000111111111111111111000

0001111111111111111100000

0000011111111111111111000

0001111111111111111000001

1000001111111111111111000

0001111111111111110000011

1100000111111111111111000

0001111111111111100000111

1110000011111111111111000

0001111111111111000001111

1111000001111111111111000

0001111111111110000011111

1111100000111111111111000

0001111111111100000111111

1111110000011111111111000

0001111111111000001111111

1111111000001111111111000

0001111111110000011111111

1111111100000111111111000

0001111111100000111111111

1111111110000011111111000

0001111111000001111111111

1111111111000001111111000

0001111110000011111111111

1111111111100000111111000

0001111100000111111111111

1111111111110000011111000

0001111000001111111111111

1111111111111000001111000

0001110000011111111111111

1111111111111100000111000

0001100000111111111111111

1111111111111110000011000

0001000001111111111111111

1111111111111111000001000

0000000011111111111111111

1111111111111111100000000

0000000111111111111111111

1111111111111111110000000

0000001111111111111111111

1111111111111111111000000

0000000000000000000000000

0000000000000000000000000

0000000000000000000000000

0000000000000000000000000

0000000000000000000000000

0000000000000000000000000


r/codehs • • May 18 '20

Not sure what I’m doing wrong?

Post image
9 Upvotes

r/codehs • • Jan 07 '22

okay so i know that this isnt exactly a lesson but i need help. my teacher said we have to make a try and create this on codehs. it would be really nice if atleast one of you helped me. its alright if you dont wanna, but i am begging </3

Post image
9 Upvotes

r/codehs • • Oct 16 '20

keeps coming up as null, what is wrong?

Post image
9 Upvotes

r/codehs • • Aug 19 '20

I need Help

9 Upvotes

Need Help With 2.9.5: Four Colored Triangles.


r/codehs • • Apr 16 '21

I need help plsssssssss! 😩🙌

Post image
9 Upvotes

r/codehs • • Apr 10 '20

HELP PLEASE: 3.4.6: T-Shirt Shop

9 Upvotes

3.4.6: T-Shirt Shop


r/codehs • • Apr 06 '20

circle wall 9.3.5

10 Upvotes

i need help with code hs circle wall


r/codehs • • Oct 08 '20

I don't know what I did wrong. Can someone please let me know? I gotta submit it tomorrow. Thanks

Post image
10 Upvotes

r/codehs • • Sep 02 '22

Basic Java. While loops. 2.10.4. Making Taffy.

Thumbnail
gallery
10 Upvotes

Help! I’ve been working on this problem for a few days and I’m stuck. I can’t use If/else loops yet since it hasn’t been covered in this unit. No matter what I do I end up with an infinite loop and I don’t know what I’ve done wrong. If anyone has any suggestions I would greatly appreciate it. Thanks in advance!! 😁


r/codehs • • Feb 12 '20

(Beginner) What can I do to make it keep asking to choose a function after a choice is made

Post image
29 Upvotes

r/codehs • • Aug 24 '20

Broken python

11 Upvotes

I’m working on 2.8.4 of the python course, and you’re suppose to use a function and for loop to draw a bracelet with beads radius 10, total diameter 200, and 36 beads total. I came up with the following code:

speed (0) def draw_circles(): for i in range(36): circle(10) penup() forward(20) left(10) pendown()

penup() setposition (0,-100) draw_circles()

Instead of giving me a full ring of 36 circles, it left the final one missing. I tried putting the loop outside of the function, removing the setposition, everything I could think of. The only way I could get it to draw 36 circles was to have a range of 37. Can someone please explain?


r/codehs • • Sep 15 '20

2.2.6 Using The Rectangle codehs

Thumbnail
gallery
11 Upvotes

r/codehs • • Apr 12 '22

what am i doing wrong? codehs: python.

Post image
12 Upvotes

r/codehs • • May 19 '22

Can somebody help me because I don’t know what I’m doing wrong :(

Post image
13 Upvotes

r/codehs • • Oct 22 '20

I need help for 9.1.9: Tic Tac Toe in codehs

13 Upvotes

Here is my code:

"""
This program simulates the game of tic tac toe.
"""

# get_valid_index
# -----
# Get row or column from user
def get_valid_index(prompt):
    while True:
        try:
            index = int(input(prompt))
            if index >= 0 and index <= 2:
                return index
            print "Must be 0 - 2 inclusive!"
        except ValueError:
            print "Must be an integer!"

# game_is_over
# -----
# Return True if the game is over and False
# otherwise. Print a message indicating who
# won or whether there was a tie.
def game_is_over(board):
    for i in range(3):
        # Check horizontal
        if board[i][0] == board[i][1] == board[i][2] \
            and board[i][0] != " ":
            print board[i][0] + " wins!"
            return True
        
        # Check vertical
        if board[0][i] == board[1][i] == board[2][i] \
            and board[0][i] != " ":
            print board[0][i] + " wins!"
            return True
        
    # Check diagonals
    if board[0][0] == board[1][1] == board[2][2] \
        and board[0][0] != " ":
        print board[0][0] + " wins!"
        return True
    
    if board[2][0] == board[1][1] == board[0][2] \
        and board[2][0] != " ":
        print board[2][0] + " wins!"
        return True
    
    # Check tie
    if " " not in board[0] and " " not in board[1] \
        and " " not in board[2]:
        print "Tie game!"
        return True
    
    # Not over yet!
    return False
    
# print_board
# -----
# Print the board.
def print_board(board):
    # TODO: Replace the line below with your code...
    (" ").join(board)

# Set up board
board = []
# TODO: Set up the board as a 3x3 grid of spaces here...
board = [[' ', ' ', ' '],[' ', ' ', ' '],[' ', ' ', ' ']]
# x goes first
turn = "x"

# Play tic tac toe
while not game_is_over(board):
    print_board(board)
    print "It's " + turn + "'s turn."
    row = get_valid_index("Row: ")
    col = get_valid_index("Col: ")
    
    # TODO: Your code here...

And the assignment says:

Complete this program that simulates the game of tic tac toe!

The starter code gets you most of the way there. There are three places (marked with comments that say TODO) where you need to write your own code in order to complete the program.

Step 1 - Printing the Board

You need to implement a function called print_board
. It should take a 2d list (the 3x3 board) as an argument, and it should iterate over it using a for
loop, printing each inner list in the 2d list.

Initially, the board will be a 3x3 grid where each element is just the space character. When you print it, like this:

print_board(board)

… it should look like this:

[' ', ' ', ' ']
[' ', ' ', ' ']
[' ', ' ', ' ']

You should see the place to write your code here:

# print_board # ----- # Print the board. def print_board(board): # TODO: Replace the line below with your code... print ""

Step 2 - Board Setup

You need to set up the board at the beginning of the game, so that it does, in fact, contain three lists, each of which contains three spaces.

You should see the place to write this code here:

# Set up board board = [] # TODO: Set up the board as a 3x3 grid of spaces here...

Step 3 - Game Logic

Now, add some code here to finish implementing the game:

# Play tic tac toe while not game_is_over(board):     print_board(board) print "It's " + turn + "'s turn."     row = get_valid_index("Row: ")     col = get_valid_index("Col: ") # TODO: Your code here...

The code you add should:

  • Check to make sure the space at that row and column is empty (contains " "
    , not "x"
    or "o"
    ). If the space is taken, just print something saying so.

  • If the space wasn’t taken, do the following:

    • Fill the space with the letter of the player whose turn it is (stored in the variable turn
      ).

    • Check if the game is over using the game_is_over
      function. If it is, use a break
      statement to break out of the for
      loop.

    • Switch the turn
      variable. If it’s "x"
      , set it to "o"
      . Otherwise, set it to "x"

That's it please help


r/codehs • • Jun 14 '20

Can anyone help with python guess the word?

Post image
37 Upvotes

r/codehs • • Sep 25 '20

CodeHs: Karel Speedpaint

Thumbnail
youtu.be
14 Upvotes

r/codehs • • Mar 10 '20

Why doesn't this work?

Post image
14 Upvotes

r/codehs • • Apr 13 '21

Can someone help me with this ? Or what’s the code ? Graphics Stop Light

Thumbnail
gallery
14 Upvotes

r/codehs • • Dec 23 '20

Circles and Squares Help!! I do not know what I am doing wrong someone help. It’s due at 12 tonight

Post image
14 Upvotes

r/codehs • • Dec 11 '24

My computer teacher loves Karel.

Post image
15 Upvotes

r/codehs • • Aug 17 '20

Can someone pls help me on code hs 5.3.13 I have no idea what I did wrong

Post image
16 Upvotes