Skip to content
Sign upLog in
← Back to Community

Repl.it process died unexpectedly

Profile icon
MichaelFaulkner

Python code won't run. It says that the repl.it process died unexpectedly. Is this replits fault or mine? https://repl.it/@MichaelFaulkner/Encryption

Answered by heyitsmarcus [earned 5 cycles]
View Answer
Voters
Profile icon
lovishheights
Profile icon
Feguri
Profile icon
Amrithaa15
Profile icon
AriesTT
Profile icon
AryaTalera
Profile icon
ChiDong1107
Profile icon
AElMahmi
Profile icon
FilipH
Profile icon
heyitsmarcus
Profile icon
MichaelFaulkner
Comments
hotnewtop
Profile icon
heyitsmarcus

You had just a couple things going wrong with your program:

  1. Your while loop has to exit at some point. It was dependent on count not being equal to the length of note. But, count was never modified so the while loop is infinite and breaks Python. A simple fix was adding count += 1 to the next line.
  2. Once that was fixed, you had an append command on a string. You only need to append your arrays here. With strings, you would do last_note += i.
  3. And then you want the user to see the encoded string, so I put that as a print statement.

I made a fork of your program that you can see here: https://repl.it/@heyitsmarcus/Encryption

print('Welcome to the encryptor.') menu = input('Would you like to encode or decode a note? ') letters = [ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", ' '] cyphertext = [ 'K','D','G','F','N','S','L','V','B','W','A','H','E','X','J','M','Q','C','P','Z','R','T','Y','I','U','O', '!', ] def encode(note): new_note = [] encoded_note = [] last_note = '' count = 0 while count != len(note): new_note.append(note[count].lower()) count += 1 print('Encoding note...') for i in new_note: for letter in letters: if i == letter: encoded_note.append(cyphertext[letters.index(letter)]) for i in encoded_note: last_note += i print(last_note) print(encode('This is a practice note'))
Profile icon
heyitsmarcus

@heyitsmarcus
Please upvote and accept my answer if you think this helped you!

Profile icon
LordGojo69

pls solve my problem i am on node.js it is coming process dies
the link is https://replit.com/@ThunderGaming5/packagejson#main.js

Profile icon
Ge1G

@wellschoolcode
fixed it just change the name of the first one back to main.py Because you have to have one on repl : https://replit.com/@Ge1G/pok3nss999#main.py

Profile icon
wellSchoolCode

i have a problem relating to this can you please help?, https://replit.com/@wellSchoolCode/FantasticRespectfulNotification#schoolTry1.py

Profile icon
AaravBhatia

i have the same problem, well it's okay

Profile icon
heyitsmarcus

Can you post the link to your repl please?

Profile icon
MichaelFaulkner

@heyitsmarcus
https://repl.it/@MichaelFaulkner/Encryption