Skip to content
Sign upLog in
Profile icon

TL

@TerrorbuildLuna
With no power comes no responsibility
Repls
Community
TerrorbuildLuna
TerrorbuildLuna
shared a Post
1 year ago
2
Stock market
It's stonks, except you can't buy anything. Yet. Move around the stocks with a and d, zoom with w and s, space for pause. Full screen recommended. Ins
graphing
Python
DynamicSquid
DynamicSquid
Nice! Just a tip: this: if self.paused == True: self.paused = False else: self.paused = True can be turned into this: self.paused = not self.paused `1 year ago
TerrorbuildLuna
TerrorbuildLuna
shared a Post
2 years ago
11
Hi guys, this is the brand new, human creator 2000! It will create many random humans (as many as the amount you entered) using ascii text. I've only
human gen
Python
VulcanWM
VulcanWM
Hey TL, haven't seen you in a while-1 year ago
Whippingdot
Whippingdot
Lul NOICE image2 years ago
SleepySid
SleepySid
image2 years ago
TerrorbuildLuna
TerrorbuildLuna
shared a Post
2 years ago
1
Run the program and you'll see :)
Huh
Python
BenjaminHannan
BenjaminHannan
cool i guess 2 years ago
TerrorbuildLuna
TerrorbuildLuna
shared a Post
2 years ago
2
So, I've been working on an Ascii pathfinder. Here it is now! Please feel free to give any suggestions for me to improve my code. You can easily edit
pathfinder
Python
PattanAhmed
PattanAhmed
Cool!2 years ago
TerrorbuildLuna
TerrorbuildLuna
shared a Post
2 years ago
3
This is the first neural network that I taught before. I taught it to play this wall dodging game. The inputs are the position of the player and the o
Simple Neural Network
Python
TerrorbuildLuna
TerrorbuildLuna
shared a Post
2 years ago
2
Just some demonstrations of basic matrix operations and some other interesting concepts. Thanks to @Coder100 and @DynamicSquid for the little bit of h
Matrices
Python
DynamicSquid
DynamicSquid
Nice!2 years ago
TerrorbuildLuna
TerrorbuildLuna
shared a Post
2 years ago
1
Hi, I'm making list of commands for a project I've been working on in Python. I would like to make it into a "dictionary" command list instead of usin
Coder100
Coder100
never ever use an if statement for this! You are going in the right path, just you had a tiny logic error! Put them inside a function so they get invoked instead: def my_func(): print("hi") return "my_func called" cmds = { "whatever": lambda: print(int(input())), "embedded example": my_func do you understand or do you need more examples } while True: output = cmdsinput() btw, you can also use the output value if output == "my_func called": print("my_func called, how was it?") 2 years ago
DynamicSquid
DynamicSquid
First create a function to do what you want. Then do this: def some_function(): do something def another function(): another function cmds = { "cmd1" : some_function, # notice it doesn't have the open brackets "cmd2" : another_function } cmds"cmd1" You can read this post for more information2 years ago
TerrorbuildLuna
TerrorbuildLuna
shared a Post
2 years ago
1
Hi peoples! I reallly need help with my python game called Traveller. I need people who are good with python classes. Please reply if you are interest
Axrevyn
Axrevyn
I could help a bit. Movement could be helped with the getkey module, so you can move without having to press Enter after pressing the movement key.2 years ago
InvisibleOne
InvisibleOne
I might be able to help a little2 years ago
MocaCDeveloper
MocaCDeveloper
What is it?2 years ago
TerrorbuildLuna
TerrorbuildLuna
shared a Post
2 years ago
1
Train a "dog" with this program by giving it commands! The dog learns through trial and error. This is my first go at Artificial Intelligence so if an
Doggy
Python
TerrorbuildLuna
TerrorbuildLuna
shared a Post
2 years ago
1
Hi, I'm making a translator that translates Modern English to Early Modern English (Shakespearean) could somebody please help? If you're interested an
PattanAhmed
PattanAhmed
Shakespearean English = Zero :( Python = Excellent! English Grammar = not bad Translators = Good These were my answers to your questions Thanks! > :/2 years ago
Coder100
Coder100
Something like: englishtoold = { 'englishwordhere': 'shakespearean_word', 'andsoon': 'whereforeartthou' } add em checking here `2 years ago
Coder100
Coder100
um, isn't that like a regexp replace?2 years ago
TerrorbuildLuna
TerrorbuildLuna
shared a Post
2 years ago
1
I followed a tutorial and made my first learning machine! :) This machine predicts student grades using grade 1, grade 2, studytime, fails, and absen
AI
Python
TerrorbuildLuna
TerrorbuildLuna
shared a Post
2 years ago
1
screen = "Score: " + str(score) + ''' %s █ %s █ %s █ %s █ %s █ %s █ %s █ %s █ %s █ %s █ ████████████████████████████████''' % (Bpos[1],Bpo
Coder100
Coder100
https://repl.it/@TerrorbuildLuna/Falling-blocks Here's the repl right?2 years ago
TerrorbuildLuna
TerrorbuildLuna
shared a Post
2 years ago
1
Repl.it says it imports modules for me, but when I tried the the msvcrt module, it failed. It works on VS code, but not here. Please help!
Discord thingy magigy
Python
theangryepicbanana
theangryepicbanana
msvcrt only works on Windows afaik2 years ago
Muffinlavania
Muffinlavania
Maybe it is not in repl? Repl isn't the GREATEST thing for python, that would probably be python shell. If you want to try to get it, go look for it in packages in your project, like Coder100 said2 years ago
adl212
adl212
@TerrorbuildLuna unfortunately, you can't import msvcrt in repl.it. Try using some other module. Upvote and choose this answer as the correct answer if so.2 years ago
TerrorbuildLuna
TerrorbuildLuna
shared a Post
2 years ago
1
There is a secret easter egg (not actually an egg, but you know what I mean) that is depressing. Only play near bedtime, because if you play any other
Rock Paper Scissors
Python
TerrorbuildLuna
TerrorbuildLuna
shared a Post
2 years ago
1
I'm making a chatbot that stores user inputs as outputs for future use. I made a file and I've tried several things to try to get the chatbot to be ab
Basic AI chatbot
Python
CodeLongAndPros
CodeLongAndPros
I like what @SpicedSpices says, but he forgot a couple of very important things. Always use a context manager: with open(foo, bar) as f: f.dostuff() The open functions takes two args: filename and mode. Filename, is, well, a filename. Mode is one of these: (r)ead, (w)rite, (a)ppend, (r)ead (b)ytes, (w)rite (b)ytes, (r)ead(+)write. And, if you don't use with, you always have to call file.close() 2 years ago
seanlnge
seanlnge
To read a text file or write to a text file, you will need to use the open() function. The open function takes a file and a mode, and will do something with that mode. text = open('words.txt', 'r') print(text.read()) This will read whatever is in words.txt. The mode can be many things. w will write to the file, r will read to the file, r+ can read and write to the file. There are other functions that open() has such as read(), write(), append(), and close(), which will do their corresponding d2 years ago
TerrorbuildLuna
TerrorbuildLuna
shared a Post
2 years ago
1
Don't mind me, just a test for something EDIT: It worked! Could someone else press the start button please? I want to test it again with a different u
Test Project
Python
TerrorbuildLuna
TerrorbuildLuna
Oh, @CodingCactus sorry to bother you, could you press the button again then wait till the code prints "done" please?2 years ago
TerrorbuildLuna
TerrorbuildLuna
Thanks @CodingCactus!2 years ago
CodingCactus
CodingCactus
yeah, i pressed it2 years ago
TerrorbuildLuna
TerrorbuildLuna
shared a Post
2 years ago
1
I am trying to make a bot in rock paper scissors that follows a certain strategy that will grant it 70% success rate. However, this requires the bot t
Rock Paper Scissors
Python
TerrorbuildLuna
TerrorbuildLuna
yup, search it up, rock paper scissors surprisingly has strategy!2 years ago
TerrorbuildLuna
TerrorbuildLuna
@DynamicSquid no there is actually a lot of strategy in the game 2 years ago
DynamicSquid
DynamicSquid
A bot? Isn't rock paper scissors just luck?2 years ago