You haven't defined a. In your code you have defined acronym , but not a. You probably meant to type acronym , but messed up
To fix it:
change the print on the last line , and replace the a with acronym
Where 'user_input' and 'a' are variables. In your current scope, user_input is a variable, however 'a' is not, so you get an error saying "name 'a' is not defined".
You should change {a} to {acronym} and it's going to work.
Top comments (4)
You haven't defined
a
. In your code you have definedacronym
, but nota
. You probably meant to typeacronym
, but messed upTo fix it:
change the
print
on the last line , and replace thea
withacronym
Anyway , good luck!
thank you !!!! You saved my life cuz this one is actually my homework TwT
You've used the expression
"print(f'Acronym of {user_input} is {a}')"
Where 'user_input' and 'a' are variables. In your current scope, user_input is a variable, however 'a' is not, so you get an error saying "name 'a' is not defined".
You should change {a} to {acronym} and it's going to work.
Thank you for your helpppp ! I will revise it. Finally I can submit my Homework TwT