Ashley Khng
@ash15khng
hi :^)
Hey people! I built this to track the number of cases of COVID 19 and decided to share it here!
Features:
Takes information from an API and displays i
Python
I've seen a few projects making use of the terminal, but it uses clickable buttons on the terminal?
How do you do that?
SPQR @Zavexeon I looked into it a bit and it seems that the terminal can sometimes detect mouse clicks but it doesn't seem to be able to get the mouse position on Linux, which is what repl.it runs on. So, clickable buttons on the terminal aren't really an option. @ash15khng If you really want buttons, though, you can have buttons which can be selected using the keyboard, like with arrow keys (don't use the arrow keys) or something of that nature.
please mark this response as the answer if I answered4 years ago
This code uses the Reddit API to get the top post from r/todayilearned, prints it out and adds it to a file.
I don't know why I made this but I needed
Python
So sorry for spamming questions, but my repl suddenly just draws a black screen?? The screen is just completely black??
https://repl.it/@ash15khng/pyg
https://repl.it/@ash15khng/pygame-moving-character
I tried to use the inbuilt pygame.Rect.colliderect, but it doesn't work. I've been on this for abou
mwilki7 I have a project that does rectangle collision detection.
https://repl.it/@mwilki7/Canvas-Basketball
(starting line 177 in basketball_func.js)
If you can convert this to python format it should work the same.
function checkCollision(a, b)
{
// get rid of these four lines if you are not worried about different types of classes colliding
if (!(a instanceof Entity))
return false;
if (!(b instanceof Entity))
return false;
var rect1 = {x: a.pos.x, y: a.pos.y, width: a4 years ago
katyadee Hey there! You should add a little more context to your question & the subject line, so it's easier for people to find and answer.4 years ago
This is just basically a drawing game in Python. Pretty useless but here it is. Use arrow keys to move the dot, and c to clear.
Why does the post body
Pygame
https://repl.it/@ash15khng/pygame-test
Basically I tried to draw a rect as you can see in the code. I don't get why it's not drawing tho.
JustARatherRidi The problem here is that you're drawing your background over your rectangle. Do screen.fill(bgcolor) before you draw your rectangle, and you should be good.
Working repl: https://repl.it/@JustARatherRidi/pygame-test4 years ago
I think this is in the wrong section but I didn't know where to ask.
You know how some people say they're helpers? How do you become one? Is there any
hyperupcall Yo
Yah I believe you're talking about becoming a Helper on the Discord server? You can apply via the Google Form 😜
As for me, I was helping out peeps for quite a while when I submitted the form - so I got accepted!4 years ago
Lights out game in python!
Basically, when you select a square, the squares around it will be turned on if they are turned off, and vice versa!
The ai
Python
What is the Collatz Conjecture?
Well, it's this conjecture that states that you start with any number and if the number is even, divide it by two and
Python
I am following this tutorial. But it gives an error when trying to run it. I am not very sure what to do, as the error does not seem related to my cod
I think this has something to do with global variables, but anyways I need to do storage -= programmes[programme], but it's giving me an error which y
Python
Geocube101 Because storage is a global variable, you don't need to set it equal to storage On line 6.4 years ago
Hi, I have a problem with my repl.
https://repl.it/@ash15khng/password-generator
When I use the random module to generate passwords, it works perfectl
timmy_i_chen Install secrets via a requirements.txt file and it should work: https://repl.it/@timmyichen/QuickwittedKookyMenu
And when you type in passwords it doesn't echo (meaning it doesn't print out what you typed in) for security reasons. :)4 years ago
This was based off this website, and I just recreated it with my own this and thats.
Python
Hi, I need help with a loop.
I'm making a code that runs new() if the input c is 'y'. However, when I type 'y' (or anything, it doesn't matter) it sto
Python
The last time I posted this, I mentioned the API is being retired, so I changed API and now have this.
Python
It uses eval to calculate things (I know that's not safe), and you can use anything from the math module.
Python
This is just a random prank to leave your friends hanging there waiting for something to load.... but nothing ever loads!
HTML, CSS, JS