[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Hi ! Can someone tell me why I have a syntax error ? #!/usr/bin/python

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 19
Thread images: 4

File: opengraph-icon-200x200.png (8KB, 200x200px) Image search: [Google]
opengraph-icon-200x200.png
8KB, 200x200px
Hi !
Can someone tell me why I have a syntax error ?


#!/usr/bin/python

ilogin = ""
ipassword = ""

def displayWelcome():
print"Welcome to your server"
print""

def getUserLogin():
return raw_input("Enter your login : ")

def getUserPass():
return raw_input("Enter your password : ")

def displayLogin(login, pass):
print "Login: " + login
print "Password: " + pass
return 0

displayWelcome()
ilogin = getUserLogin()
ipassword = getUserPass()
displayLogin(ilogin, ipass)
>>
>>61236530
Because you put a space between your last word and your punctuation dipshit. Learn to write
>>
File: 1499127409609.png (440KB, 529x427px) Image search: [Google]
1499127409609.png
440KB, 529x427px
>>61236557
What word ??
:/
>>
Why did you not post this as code so we can see indentation? Is this post just false flagging bait?
>>
>>61236530

Is that Java?
>>
File: Capture du 2017-07-05 23-50-51.png (26KB, 375x370px) Image search: [Google]
Capture du 2017-07-05 23-50-51.png
26KB, 375x370px
>>61236627
:)
>>
>>61236530
Because there is no indentation
>>
>>61236530
I think it might be because of
def displayLogin(login, pass):


pass is a keyword in python, not sure if you can use it like that. Try password instead
>>
>>61236664
I would tell you what's wrong here but it's better that you just take some time and learn how to read the error message instead so you can solve this babby shit on your own next time
>>
>>61236694
Also following on from this,

ipassword = getUserPass()
displayLogin(ilogin, ipass)

ipass doesn't match up with ipassword...
>>
>>61236694
It's work !
thank you man !!
>>
>>61236721
http://www.tutorialspoint.com/python/python_pass_statement.htm
>>
File: Capture du 2017-07-05 23-57-25.png (53KB, 1132x387px) Image search: [Google]
Capture du 2017-07-05 23-57-25.png
53KB, 1132x387px
>>61236721
>>
Not doing your homework kyz

Why the fuck are you writing python 2 in babbies first python lmaoing at your life
>>
https://www.youtube.com/watch?v=ULz3XJq9VF0
>>
>>61236694
>>61236711
Neither of these are syntax errors
>>
>>61236831
You comment is. Learn to put together a sentence, brainlet.
>>
>>61236870
Are you special?
>>
>>61236530
>raw_input
Use Python 3.6
Thread posts: 19
Thread images: 4


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.