Question about input() use in Python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Question about input() use in Python

Hello, Ive been having an issue using input() while working on a code bit. Sequence=ā€œHero attacks Boss with input(ā€˜Enter weapon: ā€˜).ā€ print(Sequence) Basically, Iā€™m wanting to use several inputs with Sequence until Boss_health hits 0. But in the while loop Im using after, I canā€™t figure out how to refer back to the input() without hitting a EoF error. Im sure how I have it is wrong in some simple way, but I canā€™t seem to figure out an alternate way. https://code.sololearn.com/crJqxu1AwPv6/?ref=app

20th Jun 2022, 3:29 AM
Cody
1 Answer
0
Remember that Sololearn needs all of the inputs upfront. I think another issue is that you've labelled your variables with capitals and that can make the compiler think of classes/methods/objects.
20th Jun 2022, 11:10 AM
Ausgrindtube
Ausgrindtube - avatar