Skip to content
Sign upLog in
Profile icon

jnrchewie

@jnrchewie
“Walking on water and developing software from a specification are easy if both are frozen.” ― Edward V. Berard
  • space adventure

    Cover page
    Made with Python

    A game where you are stranded in space and cannot leave until you finish of the intruder

    Recent comments (0)
  • wordle

    Cover page
    Made with Python
    Recent comments (0)
  • spiral

    Cover page
    Made with Python (with Turtle)

    a cool colourfull shapes just put in a angle magnafiation and speed and the reason for the picture is that it is the only one i could find in my drive

    Recent comments (1)
    jnrchewie
    jnrchewie
    7 months ago

    hello

Repls
Community
jnrchewie
jnrchewie
published a Repl
4 months ago
1
space adventure
space adventure A game where you are stranded in space and cannot leave until you finish of the intruder
#games
#python
jnrchewie
jnrchewie
published a Repl
7 months ago
0
wordle
jnrchewie
jnrchewie
shared a Post
1 year ago
1
every time i run the program it shows the image but then gives me an error
jnrchewie
jnrchewie
shared a Post
1 year ago
1
it is warning me that the main file is not a header file and that i cannot use a #pragma once because of this
c++ game
C++
DynamicSquid
DynamicSquid
You can not use #pragma once in .cpp files, only in .h files1 year ago
jnrchewie
jnrchewie
published a Repl
1 year ago
1
spiral
spirala cool colourfull shapes just put in a angle magnafiation and speed and the reason for the picture is that it is the only one i could find in my drive
jnrchewie
jnrchewie
hello 7 months ago
jnrchewie
jnrchewie
published a Repl
1 year ago
0
replit
replitit is a replica of replit share with your friends sorry
jnrchewie
jnrchewie
shared a Post
1 year ago
2
when i run the code it comes up with the error: 'TokenError: EOF in multi-line statement on line 35' but there is no line 35? how do i fix this
mutiple turtle
Python (with Turtle)
jnrchewie
jnrchewie
shared a Post
1 year ago
5
i want to change the text color like i did in space adventure but i dont know how to do it in c++ please help
JustinArgue
JustinArgue
Can you do this with chars?6 months ago
PdVivekanand
PdVivekanand
@jnrchewie Thanks!7 months ago
Bookie0
Bookie0
Check out a tutorial here (scroll down to colors): ANSI Escapes Codes Now you might be wondering, how can I change the colour of the console text? Squids can chnage colour, so why can't the console? Well you actually can! There's something called an ANSI code. It let's you specify what colour your text should be! You can use it like this: cout you can also specify RGB values for ansi escape sequences this can be done with \033[38;2;;;m you can also set the RGB of the background using \033[41 year ago
jnrchewie
jnrchewie
shared a Post
1 year ago
2
i want to make a save system that creates a file for each player with there save in the folder user. So how do i make it so that the load_save void se
c++ game
C++
xxpertHacker
xxpertHacker
What specific problem(s) are you struggling with?1 year ago
YeetMstr
YeetMstr
I think instead of using a folder, you should use one file that stores all the info with a split like - per user and / per item in the save just a suggestion1 year ago
jnrchewie
jnrchewie
shared a Post
2 years ago
1
how do i replace gun in the array no matter where it is in the array?
CodingCactus
CodingCactus
You can use .index() method to get the index of "gun" in the array and then use that to replace it. If "gun" isn't in the array it will error so you may want to check it is in first. e.g. array = ["cactus", "spike", "gun", "desert"] if "gun" in array: array[array.index("gun")] = "not a gun anymore" else: print("gun isn't in that array") `2 years ago
RYANTADIPARTHI
RYANTADIPARTHI
Solution maybe, try something like this. strings = ["something", "gun", "ball", "fel"] new_strings = [] for string in strings: new_string = string.replace("gun", "replaced") newstrings.append(newstring) print(new_strings) maybe that should work.2 years ago
jnrchewie
jnrchewie
shared a Post
2 years ago
1
like plr_ans = input("what do you want to do") if plr_ans == "put the tablet down": is there another phase i can use
ObiVibKenobi
ObiVibKenobi
@jnrchewie There is one I can think of, but that works too. if (input(“What do you want to do?”) == “put the tablet down”): print(‘ok’) `2 years ago
RYANTADIPARTHI
RYANTADIPARTHI
That's good. It's basic, but you can use a phrase of your choice. whatever appeals to you.2 years ago
jnrchewie
jnrchewie
shared a Post
2 years ago
1
What is circular import and how do I fix it?
RYANTADIPARTHI
RYANTADIPARTHI
you have errors wherever you put a fail at. I think you have to put the message manually, instead of calling a function. another thing is, you have parameters in your function, but when you are calling the function, you aren't filling out the parameters. do that, and you'll be set2 years ago
jnrchewie
jnrchewie
shared a Post
2 years ago
1
#html
#coding
#game
+1
dont blame me it was from Feross Aboukhadijeh
replit
HTML, CSS, JS
JarodL
JarodL
That was brutal.....2 years ago
ch1ck3n
ch1ck3n
Oh man2 years ago
jnrchewie
jnrchewie
shared a Post
2 years ago
1
how do i fix a circular import so that went they die they have the choice to restart and go to main.
RYANTADIPARTHI
RYANTADIPARTHI
you aren't indenting properly. Try indenting properly. It will work.2 years ago
Coder100
Coder100
Why would you import main? Ideally, you would define functions that were to be called in combat, but that's all. Don't import anything else, and if you need to access some of those variables, just pass them in like function args def a(b): ... `2 years ago
jnrchewie
jnrchewie
shared a Post
2 years ago
1
go through the door and you will see
RYANTADIPARTHI
RYANTADIPARTHI
The run of the program doesn't work for me, but one thing i can say is, you are importing combat.py but you don't have a real name for it. the server doesn't know which function or class. so if you want to use init, name a class, or if function, name is accordingly.2 years ago
InvisibleOne
InvisibleOne
I think you should try naming your function in combat.py something other then init2 years ago
jnrchewie
jnrchewie
shared a Post
2 years ago
1
without using from keyboard import
MarcBauchet
MarcBauchet
with that one, no need for root access in linux: https://sshkeyboard.readthedocs.io/en/latest/ i had to install it in Replit though3 months ago
Wumi4
Wumi4
Just import them as usual! The example from the official documentation import keyboard keyboard.pressandrelease('shift+s, space') keyboard.write('The quick brown fox jumps over the lazy dog.') keyboard.add_hotkey('ctrl+shift+a', print, args=('triggered', 'hotkey')) Press PAGE UP then PAGE DOWN to type "foobar". keyboard.add_hotkey('page up, page down', lambda: keyboard.write('foobar')) Blocks until you press ESC. keyboard.wait('esc') Record events until 'ESC' is pressed. recorded = keyboa2 years ago
PattanAhmed
PattanAhmed
Can you please clarify your question.2 years ago
jnrchewie
jnrchewie
shared a Post
2 years ago
2
for some reason it is saying skeleton_lord() is undefined even though it is defined below
battle simulator
Python
jnrchewie
jnrchewie
shared a Post
2 years ago
1
'''How do I make it go to x ,y coordinates where y = m*x+c and x = 0 and has been answered''' after I have entered m and c it stops even though there
SUHASTADIPARTH1
SUHASTADIPARTH1
You might want to keep calling the function that does the grid in a forever while loop or for loop2 years ago
RYANTADIPARTHI
RYANTADIPARTHI
Try this: turtle = turtle.Turtle() x = 300 y = 500 turtle.goto(x, y) You can use goto() to go to x, y coordinates 2 years ago
jnrchewie
jnrchewie
shared a Post
2 years ago
1
i have been trying to make a monkey theory tester that save the first monkeys txt with this: with open(monone.txt, mon1) as monkeyone: monkeyone.writ
monkeys on a typewriter
Python
RYANTADIPARTHI
RYANTADIPARTHI
Thank you!2 years ago
RYANTADIPARTHI
RYANTADIPARTHI
You're missing the string quotations for that file. with open('monone.txt', 'mon1') as monkeyone: monkeyone.write(mon1) monkey_one.close() That should work.2 years ago
Wumi4
Wumi4
You miss the string at monone.txt. I think this is pretty vague but hope you still understand it.2 years ago