Skip to content
Sign upLog in
← Back to Community

how to do this in PYTHON.

Profile icon
Rocking-Rayquaza

Recently i have been working on a game but i want to add a feature in it that when the game intro is on display ..I will print something like "PRESS ENTER"and until the user presses the enter key the program should not function so is there a way to do that?

any help would be appreciated..
and if you have any suggestions or comments about the game please provide them in the comments.

REGARDS,
rayquaza

Answered by PattanAhmed [earned 5 cycles]
View Answer
Voters
Profile icon
Rocking-Rayquaza
Comments
hotnewtop
Profile icon
PattanAhmed

@ROCKINGRAYQUAZA
Hi,
You can keep an If Statement like this:-

blank = '' input = input('Press Enter') if input == blank print('hello') elif input != blank: print('Please press Enter') else: print('An Error occured.\nPress Enter')

Now the main thing is to change this example to your code in the correct part.
For that, Try your best.

With my best wishes
Hope this helps
Please mark my answer if this helps

Profile icon
Rocking-Rayquaza

thanks bro are you a proffessional coder or a [email protected]

Profile icon
PattanAhmed

@ROCKINGRAYQUAZA
Welcome!
I am a little bit professional in coding dude.
LoL
Anyways, Happy to help you!

Profile icon
HahaYes

@PattanAhmed
yes a bit professional smh

Profile icon
HahaYes

@PattanAhmed
STOP SPOONFEEDING

Profile icon
HahaYes

@PattanAhmed
BLATANT SPOONFEEDING STOP

Profile icon
Vandesm14

@HahaYes
It's not spoonfeeding. Please stop reporting spoonfeeding altogether if you don't know what is and isn't spoonfeeding.

Profile icon
PattanAhmed

@Vandesm14
Thanks a lot...
This guy always accuses me by telling me spoonfeeding!
I have been accused 4 times publicly and I don't know what to do.
But, Thanks million times for your support.

Profile icon
Rocking-Rayquaza

i joined discord

@PattanAhmed

Profile icon
PattanAhmed

@ROCKINGRAYQUAZA
ID?

Profile icon
Rocking-Rayquaza

ROCKINGRAYQUAZA#2811

@PattanAhmed

Profile icon
PattanAhmed

@ROCKINGRAYQUAZA
Ok