Hey guys, it's been a while. So I'm back with some questions, naturally. Here goes. So, I downloaded "Python Interpreter with Kivy" or something along those lines on my Android device. I then made a program (well, am making a program) but I receive an EOF error at runtime. Which says the following:

ERROR: Traceback (most recent call last):
File "/home/mataeoh/buildozer/.
.py", line 65, in run_script
File "<string>", line 9, in <module>
EOFError: EOF when reading a line

Yeah, I have no idea what to do. Anyone?
Your code ends at a point where it is illegal to end. It's a syntax error. (Maybe. Who knows what whatever app you downloaded is actually doing- it might be something completely insane and flaky.)
That may be it; it's incomplete, but I was pretty sure I didn't end in a wonky place. I'll double check the code.

EDIT: The following is the code in the works. I don't see why it'd throw that error, but any differing opinions?

#Cipher Encoder and Decoder
print("1. Caesar Cipher")
print("2. Vigenere Cipher")
print("Choose a Cipher")
choice = 0
while choice <1 and choice >2:
    choice = int(input())
if choice == 1:
    print("Caesar Cipher")
    print("1. Encode a Message")
    print("2. Decode a Message")
    caesarChoice = 0
    while caesarChoice <1 and caesarChoice >2:
        caesarChoice = int(input())
    if caesarChoice == 1:
        print("Input a Message:")
        message = input().lower
        print("Input a Shift:")
        shift = int(input())
        shiftList = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"
        encodedMessage = ""
        for x in range(0,len(message)):
            letter = message[x]
            place = shiftList.find(letter)
            newLetter = shiftList[place+shift]
            encodedMessage = encodedMessage + newLetter
For one, you're writing python 3 (where print is a function), but this app appears to do python 2 (based on one of the screenshots- docs don't say). There are also at least two classes of errors in your code (one which repeats twice, and the second which I stopped testing it after encountering).

Neither of those seem like they should cause such a problem, but I have little faith in that app's quality when it appears to have large amounts of code lifted wholesale from Ren'Py with no apparent understanding of the purpose of much of it.
The app does support Python 3; I tested it with a print("hello") test, and it passed. And I realize my code has errors; I was going to fix that sometime, I suppose, after getting a gist of it down.

So you believe it's an issue with the app itself, then?
print("hello") will work the same on both 2 and 3, so that's not a sufficient test. Better to try something like print("Hello world", end="!\n"), which is a syntax error on python 2.
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum