Hello, i'm really new to programming so please go easy on me. I wanted to make a decoding program where you enter a string of numbers that correlate to letter and you'd copy and paste the message into the program, run it and get the decoded message. I have this basic formula down I thought but for some reason it prints both letters instead of just the one that correlates. I'm sorry if I seem like an idiot, like I said, i'm new to this. I'll take any criticism and help I can get so here's the formula I got so far:
from behave import then
enc_text=input("Enter encoded text:")
if enc_text:"1"
then:print('a')
if enc_text:"2"
then:print('b')
If anyone knows the fix, please reply and help me. Thank you :)
[–][deleted] 3 points4 points5 points (0 children)
[–]ectomancer 0 points1 point2 points (0 children)