• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Is there any way I can make my python number guesser more efficient?

Resolved: Is there any way I can make my python number guesser more efficient?

0
By Isaac Tonny on 16/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

So I have a game where you have to guess a number the code picks at random (I was looking at project ideas), before taking a look at the answer I want to know if there is a more efficient to store the if’s? I do think there might be a way to merge them into one single block and delete the others.

Answer:

Just ask for the guess inside the loop. You can use a for loop to iterate 4 times.

If you have better answer, please add a comment about this, thank you!

algorithm python
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: what are the permissions required to assign a resource monitor to a warehouse?

01/04/2023

Resolved: How can I modify formData before sending it?

01/04/2023

Resolved: How to efficient create SimpleITK image?

01/04/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.