A simple error - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Homework (https://python-forum.io/forum-9.html) +--- Thread: A simple error (/thread-23585.html) |
A simple error - GFreenD - Jan-07-2020 Hey can someone guide me to right direction as ive stumbled upon what it seems to be a simple error but cant understand what is wrong or missing something out name = input("Name on your bank account? ") def name (): if name=='Sweed': print('sw') elif name=='SEB': print('sb') else: print("wrong bank name")with it or without programs runs fine its like its choces to ignore it RE: A simple error - Axel_Erfurt - Jan-07-2020 You can not use name for variable and def name = input("Name on your bank account? ") def check_name (): if name=='Sweed': print('sw') elif name=='SEB': print('sb') else: print("wrong bank name") check_name() RE: A simple error - GFreenD - Jan-07-2020 damn i couldint wrap my head around of what was wrong thanks for pointing that out it works as intended now |