[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]

>tfw brainlet python 3 isnt printing "Hi" + name

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: 21
Thread images: 7

File: Screenshot_10.png (39KB, 1919x1021px) Image search: [Google]
Screenshot_10.png
39KB, 1919x1021px
>tfw brainlet

python 3 isnt printing "Hi" + name +"!" for some reason WTF please explain this to a brainlet like me
>>
WTF
>vs code
>infinite while loop
def greet():
name = input("Enter your name: ")
print("Hello ", name);
greet()
>>
File: b36.png (12KB, 420x420px) Image search: [Google]
b36.png
12KB, 420x420px
Works on My Machineā„¢
>>
>>61359131
use the terminal instead of console
>>
you're telling it to print something as long as a variable is true, which it always is
>>
So much cancer in a single post.
>>
python 2 or 3, nigger?
>>
File: pic_fuhrer_cute.jpg (13KB, 236x261px) Image search: [Google]
pic_fuhrer_cute.jpg
13KB, 236x261px
>>61359131
Just remove the while statement and you should be good to go.
>>
Thanks guys, I really needed help with my homework.
>>
>>61359131

why do you need the boolean flag and the while loop?
>>
>>61359131
Wtf is the point of the while statement and namedefined variable, take that shit out.
>>
>>61359209
Shouldn't matter. I tried it in the VSCode console and it works perfectly.
OP, you should try pressing Ctrl + Shift + P and typing "run python file in terminal"
>>
File: Screenshot (100).png (221KB, 2560x1440px) Image search: [Google]
Screenshot (100).png
221KB, 2560x1440px
>>61359233
If he's using python 2 he needs to use raw_input not input

source: expert programmer
>>
OP, use JS like a normal human being and just practice on JSfiddle

Python is botnet and will give you cancer
>>
File: pic_fuhrer_cute_1.jpg (81KB, 579x863px) Image search: [Google]
pic_fuhrer_cute_1.jpg
81KB, 579x863px
>>61359282
You're right on that~
>>
>>61359219
3
>>61359260
this works, thanks!

>>61359253
>>61359233
i added that nonsense just to see if it makes a difference, because when i ran

def greet():
name = input("Enter your name: ")
print("Hello ", name);
greet()

the first time it wasnt working
>>
>>61359282
He said hes using python 3
>>
>>61359321
tru didn't see that
>>
File: pic_fuhrer_cute_2.jpg (64KB, 850x1133px) Image search: [Google]
pic_fuhrer_cute_2.jpg
64KB, 850x1133px
>>61359308
Then why post the version with the nonsense in the first place??
>>
>>61359335
because im a brainlet please sage :(
>>
File: 1497708558816.gif (2MB, 202x360px) Image search: [Google]
1497708558816.gif
2MB, 202x360px
Thread posts: 21
Thread images: 7


[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.