I'm a self-taught programmer. I've been studying ICT stuff for 4 years. Would love to teach languages around the world
Rectangle movementMade with PygameRecent comments (0)
How can I make my "playersprite" move back (x -= 10) when colliding with "grasssprite"? I tried multiple solutions but none worked for me. Pls Help
Keep in mind that the path variable may differ from yours. It has been created directly for my usage.
So I created a programme to convert Euro/Pounds to PLN and vice versa.
Over 250 line code RPG. Work still in progress but wanted to show this.
Can someone tell me what secret functions can be used for. Example of a secret function. class Main: def __code(self): print("Hello")
DynamicSquid private method. They can only be used in the class. class Main: def _privatemethod(self): print("no one can see this but this class") def callprivatemethod(self): self._privatemethod() object = Main() object.callprivatemethod() # okay object._privatemethod() # error! `2 years ago
Coder100 read more2 years ago
Coder100 That is not a secret function. That is a private method. class Human: _getCreditCard(self): return "1234567890" getName(self): return "Coder100" Others should not be able to access your credit card, but you should be able to.2 years ago
Won't give any cycles. So I wanted to create an RPG but I don't really have any idea for the plot. It's supposed to be filled with magic, taverns, dra
InvisibleOne Gimmeh a moment ...2 years ago
EpicGamer007 You are transported to an isekai, and have to defeat a demon king who has been terrorizing the people of your world and you, the adventurer, are o a quest to defeat the demon king. HaHa, I am so not creative.. :P2 years ago
octopyBot :P dunno, I guess you could look up a dnd campaign and go from there?2 years ago
A simple concept of code for checking errors in the code. It throws you a scripted error if you answer "False" and if you try answering with something
Vandesm14 I noticed that you posted this twice. Please only post things once on Repl Talk. I'm going to have to delete one of them, either this one or the one listed below: https://repl.it/talk/learn/Code-for-checking-errors-in-the-code/500932 years ago
Randomly selects cards from range 1-10 and draws the one with the biggest number
I've recently decided to go to a job as a Python teacher for younger students and decided to try if I can teach someone or not. So an idea came to my
So I have: Bool_1 = [True,True,False,True] Bool_2 = [True, False,False, True,True] And I want to create a function to count how many True's are in e
InvisibleOne Bool_1 = [True, True, False, True] one_false = False howmanytrue = 0 for val in Bool_1: if val == True: if one_false == True: break else: howmanytrue += 1 else: one_false = True Something like this2 years ago
Ever wondered what astroid module can be capable of?
It's a short programme that allows you to check how many CPUs you have. Another feature can create a folder in a location you input.
I have 2 questions. How to make a collision for this code: I want 'newsegment' to disappear once 'spaceship' touches it. How to track the 'space shi
Muffinlavania This is a collision equation: def is_hit(t1,t2): #THIS IS IT RIGHT HERE: distance=math.pow(t1.xcor()-t2.xcor(),2)+math.pow(t1.ycor()-t2.ycor(),2) if distance<150:#Higher the number more lenient the collision is return True else: return False Then you can do something like this: if ishit(newsegment,spaceship): #whatever I think you might have to substitute some things, i used this in this and it worked fine, hopefully it works for you! Also what do you mean by "tra2 years ago
octopyBot I don't really know what you mean, but I know you have a major issue with your code. It won't even run for me, so I would suggest you clean that up first. 2 years ago
So I created a sample of a choice-based game. I'll try expanding it from time to time to move the story forward. It is advised to read RULES at the fi
How to merge dictonaries, get index form list and how to append lists
So I created that code here, but don't know how to make score appear on a turtle window
PattanAhmed @DEMONul1234 Hi, **You can follow this awesome tutorial to find out how to make a perfect Pygame game. Click here and you are done** You can fast-forward until your part of clarification is shown *Hope this helps Please mark my answer if this helps*2 years ago
Muffinlavania @DEMONul1234 !!!! I literally just made a game with this concept here it is https://repl.it/@Muffinlavania/Super-Blaster In the code you will see a turtle named scorekeeper, that the one that does it (Also play the game because to me it is very fun, i would full screen the turtle window) oh wait.. this is pygame idk2 years ago
I created a simple license generator for those who just want to get it automated. It's just a concept. Can also be used to practice putting arguments
In this tutorial, I want to show you how you can create an object inside of turtle and how to move it around.
So I created a simple programme that allows a user to move around with a block using w,s,a,d and space. Still working on collision