Hermione Granger
@HermioneGrange2
Just a young wizard coding classes and Hogwarts. Name's Hermione, by the way. Coding is magic!
In Python, how would I take away an item from a list instead of adding one?
Bookie0 you could have googled it.. :/
There are several ways:
.clear() to remove all items from list:
my_list = ['foo', 'bar']
my_list.clear() # nothing in list
del for a specific index (remember indexing starts at 0)
my_list = ['foo', 'bar']
del my_list[1] # removes item at index 1: 'bar'
.pop() kinda same thing, but it'll useful if you still want to use the item you just took off
my_list = ['foo', 'bar']
my_list.pop(0) # removes item at index 0: 'foo'
.remove() # to remove an item from th2 years ago
firedragondnd here is a link: https://www.geeksforgeeks.org/how-to-remove-an-item-from-the-list-in-python/2 years ago
for a game I'm working on with PYTHON I want to be able to search a list for a specific item. My list is called Inventory. For example, could I go:
i
Bookie0 You could also googled this one.. :/
Just use a simple in with conditionals:
my_list = ['foo', 'bar']
if 'foo' in mylist: # checks if 'foo' is in the mylist list
print('Foo found!')
Check this out for more! ;)2 years ago
You have been invited to join Hogwarts School of Witchcraft and wizardry!
Goal
Collect enough money to buy all the items on your school list by explo
Python
Brendan23 @HermioneGrange2 awesome game. some grammar errors but other than that nice job!
P.S. I'm also a Harry Potter fan.🧙♂️2 years ago
I want to create a typing game that detects WPM and Accuracy, but I have no idea how to detect either of those. Have you ever made a typing game and h
Coder100 lol didn't I make one
but for detecting typing, I would recommend using getch
from getch import getch
key = getch()
print(key)
https://pypi.org/project/getch/2 years ago
Hi! I really really want to code more but I'm COMPLETELY OUT OF IDEAS. I use python, and I'm not very experienced. I'm very good at text based games a
Bookie0 Okie dokie, the full list lol:
Here are some great ideas to get you started:
pacman
battleship
choice making game
quiz (like harry potter quiz, math quiz, star wars quiz)
personality quiz (like which house are you in HP, are you a nerd/jock/popular/idiot etc)
tic tac toe
pong
minesweeper
uno
dice rolling game
name/place/idea/story generator
HTML webpage about yourself
text based adventure game
simulator (Life sim, cooking sim, teacher sim, fighting sim, etc.)
hotel managment game
game like Amo2 years ago
VixCoder Make a text adventure where you have to save a chicken nugget from your worst nemesis “Hexagon Man”2 years ago
Answer the questions and make an awesome spirographic pattern!
Python (with Turtle)
I created this using a meme API, just choose a background and type bottom text and top text and it will automatically download a meme on the repl.
enj
Python
Hi! I'm a cartoonist (as some of you might know) but I've been really bored lately with nothing to draw, no inspiration. If you want me to draw you so
InvisibleOne Draw me please:
Description: Tall, thin, small chin, large nose and ears, short hair, unbrushed teeth, I generally wear black jeans or grey cargo paints, I wear black or brown shoes, and I am usually wearing a black and grey rain jacket with a lot of random items in my pockets. Oh yeah, and one important thing, I'm invisible:
Here's my picture if it helps:
santa-hat-22 years ago
Kookiez Hi there,
The repl talk is is only for coding questions. However, you can ask people on the repl.it discord server!
Thanks!2 years ago
I know this question sounds dumb considering I see it all the time, but what are the numbers after your username for? For example, for me it says Herm
Bookie0 Same question as yours here (If you scrolled down a bit more you'd have seen it! ;)
My answer:
> Cycles are useless internet points; you get one when someone upvotes your comment/post or if they select your answer as correct.
> view them next to your name in paranthesis or on your profile or on the leaderboard.
Screen Shot 2021-02-02 at 2.26.31 PM2 years ago
19wintersp Those are the amount of cycles you have; they are useless internet points. You get one cycle if you get upvoted, five if your comment is selected as an answer to a question. They can be compared to Karma on Reddit, for example. Please note that this question has been asked before, so try to search for questions before asking them.2 years ago
Just a simple calculator - not that good if you ask me. Just a quick 5 minute program I did for fun. (also to use for school hehe)
Python
So... my brother's best friend has a cat named "SprinkleMc.SmellyTail," and he decided that when he gets a cat he needs a funny name. He came home dem
Python
I click on others repls in talk, and then it will not load. So I cannot click on run repl. the screen just stays blank. do any of you know why this is
NateRiver0 i've had a similar problem, a lot of the time it's a one day thing and should go away soon2 years ago
Coder100 It's probably a bug. Anyways, it is working for me, so make sure it isn't just because of your internet or anything.2 years ago
RhinoRunner lol I got
it seems you are your own person! None of these pizzas fit you. I guess youre just a person and not a pizza haha
`2 years ago
This is a quiz my friends made - but they don't know how to code so I created a program for it to make it a game. Have fun!
Python
Are you Fred Weasley? Are you Draco Malfoy? Or are you Hermione Granger? Find out which student you are by taking this quiz I created!
Python
Create a meme by choosing photos, writing the top text and the bottom text. The memes will be automatically downloaded on your repl!
Python
Answer questions to create a beautiful design.
Screen Shot 2020-09-03 at 11.32.22 AM
Python (with Turtle)
I created this not long ago. This is a Harry Potter themed Diagon Alley simulator. Go to the bank, get money, and buy things! Have Fun!
Python
This was my first ever drawing with Python Turtle, and I wanted to make it unique. I decided on a turtle :D. I hope you like it!
Python (with Turtle)