Ask your own question, for FREE!
Computer Science 23 Online
Sharkattack123:

I need help

Sharkattack123:

1 attachment
Sharkattack123:

I don't get this.

Sharkattack123:

@extrinix

Extrinix:

Python i'm assuming?

Sharkattack123:

@extrinix wrote:
Python i'm assuming?
yes

Extrinix:

Define a variable as always true, set it so while the variable is true, the game keeps running, but when the variable turns false (person answers correctly) the game stops That's the objective for this script, correct?

Sharkattack123:

Yuh, I gotta like type out this in a idle and print it :p as an output

Extrinix:

Yeah so, the loop you're looking for is a while not loop, (a reverse while loop) ``` # prior code while not (secretNum): # rest of your code ``` You can also use a not-equal-to-comparison operator ``` # prior code while (userGuess != secretNum): ```

Extrinix:

That's a code parser.

Sharkattack123:

alright

Extrinix:

@extrinix wrote:
Yeah so, the loop you're looking for is a while not loop, (a reverse while loop) ``` # prior code while not (secretNum): # rest of your code ``` You can also use a not-equal-to-comparison operator ``` # prior code while (userGuess != secretNum): ```
I'm sure you can understand how these work lol

Sharkattack123:

@extrinix wrote:
@extrinix wrote:
Yeah so, the loop you're looking for is a while not loop, (a reverse while loop) ``` # prior code while not (secretNum): # rest of your code ``` You can also use a not-equal-to-comparison operator ``` # prior code while (userGuess != secretNum): ``````
` I'm sure you can understand how these work lol`
"slowly"

curriful:

exterminator smart

ykbatman:

supa smat

ykbatman:

not me tho

ykbatman:

idk how to comprehend that

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!