Lord Poseidon

@Lord_Poseidon (111)
Do you like games?
posted to Ask

+1 for the nicely asked question. 75% of the posts we get these days are spam. Makes sense to reward the good ones.

How I solved the Secret Announcement
posted to Learn by Lord_Poseidon

Thanks for the upvotes!

I am creating a project for my students
posted to Ask by ShirjeelQureshi

I have heard the same question several times on repl talk. Can you somehow confirm you're a teacher? Also, sharing code is not in the spirit of repl talk. We just nudge you in the right direction, giving advice and/or resources. Thanks you for your patience

How Did YOU Find Repl.it
posted to Ask by PYer

I had to program on dad's office laptop once and I couldn't install anything there. A quick Google search landed me here. Now I use repl.it even if I'm on my PC

A bad hashing algorithm
posted to Share by 21natzil

Good work! Glad to be of assistance. Gotta define badhash(1), badhash(0) and check if I can reverse-engineer it tomorrow

why isent this right
posted to Ask by satijn

Python uses a different range syntax. For example, to count from 0 to 9, the code is for i in range(10):
If you want to start from 1, you can always do for i in range(1,10):
Which will give the same result are for i in [1,2,3,4,5,6,7,8,9]:
Mark as answer if this helps! ;-)

Using .txt files in python
posted to Ask by CarlLiljencrant

Files made programmatically don't really update on repl.it. I'd suggest using an external database such as PostgreSQL or even google sheets API

Repl.it Mobile App
posted to Ask by Kognise

You got my upvote

posted to Announcements by katyadee

Congratulations to the winners! Make sure to give your games a future!

Java outputting long string when using Scanner
posted to Ask by KieranGallison

in lines 40 and 42, note that input is a scanner object and not a string. You might want to replace input with word in those two lines. Upvote and/or mark as answer if this helps!

Python "Builtin_function_or_method" error! Help!
posted to Ask by DragoniteDL

same with len[chars]

Python "Builtin_function_or_method" error! Help!
posted to Ask by DragoniteDL

It's len(code) and not len[code] Note this parenthesis and the square brackets

posted to Share by SugeshVaran

word_list is literally the first variable you define. Try putting the answers in a .env if you don't want others to see them

[Python]How do i can make a str print statement that doesn't prints " ' "?
posted to Ask by PAULX

@PAULX your welcome.Don't hestitate to ask anything else here :-)

[Python]How do i can make a str print statement that doesn't prints " ' "?
posted to Ask by PAULX

You unnecessarily complicated the variable abc and called the str function on what were already strings.I slightly modified your code to make it work https://repl.it/@Lord_Poseidon/password-makerpy

Game In Python
posted to Ask by AidanSlyker

@AidanSlyker oh sorry.
Basically, what I mean is put all your text in a list of strings(I hope you know what they are).like

l=["This is the story of a man named Stanley.","Stanley worked for a company in a big building where he was employee # 427."...]

and a list of times like:t=[2,2,4,5,...]
And then use a loop like

for i in range(len(l)):

upvote if this helps!

Game In Python
posted to Ask by AidanSlyker

Since the timings are irregular and all, you can try putting the text and times in seperate lists and then call them with a loop

Does anyone know were to start with C++?
posted to Ask by Galamphin

Try sololearn

👋✨Introduce yourself 🎉😀
posted to Announcements by amasad

Im lord poseidon.you might have seen me on discord.

DEV SPOTLIGHT: Francis Bacon said "knowledge is power." Then there's too much power.
posted to Announcements by katyadee

Making the Dystopian Monopoly was (mostly) a fun experience. It was amazing, collaborating with other developers for the first time, experiencing workaholism for the first time and so on..

Enigma wrote about 1k lines of game logic, PYer worked out the in-game chat system and was vital in conceptualizing. I had to look over the frontend and communication (enabling multiplayer and all) so naturally, They became the worst parts of the game, violating simple online safety rules like that about GET requests causing state changes and all.

Here are links that work
(post link):
(game link):

(for the backend code)

why isnt fuction
posted to Ask by informatica4inf

You are not supposed to ask for help during an examination.
There are some of syntactical and type errors in your code. Here's a fixed version:

n_notas=int(input("introduce un numero"))
while k <=n_notas:
    nota=int(input("dime las notas"))
Can Anyone Tell me what im doing wrong here? on question one. Not Answered!
posted to Ask by PurpleHayes97

The link you provided shows a 404 not found error. Please check.

If and else statement
posted to Ask by aksheyk257

Please do not put your email address/phone number/whatever on repl talk. Edit your post before a mod does.

Germany should be treated as a string. So, instead of world == Germany you can try world == 'Germany and it should work.
the whole code would be:

world = input('who won?')
if world == 'Germany':
Python, Point to folder and execute custom.py from main.py
posted to Ask by Pyron

Press ctrl+shift+p. In the menu, choose open shell. This will open a shell where you can cd into your files and just run them as you would offline, python my.py.

I am creating a project for my students
posted to Ask by ShirjeelQureshi

@ShirjeelQureshi your first line would be for i in range(int(input())):
For taking in n numbers.

Instead of bothering with numeral math, is suggest you take in the rest of the input as strings with input(). In each iteration, append this to a variable that contains all digits.

Outside of the loop, use the inbuilt count or even a list comprehension with a condition.

Sorry for the thick explanation

posted to Ask by ilikepenguins

It does tho

Using .txt files in python
posted to Ask by CarlLiljencrant

@CarlLiljencrant here's another suggestion^