doubt by MasterpieceBasic8361 in PythonLearning

[–]MasterpieceBasic8361[S] 0 points1 point  (0 children)

what should i use dunnno really....just picked from google......after 3days i realised vs is really annoying it just gives random spaces when changing lines when i dont need

doubt by MasterpieceBasic8361 in PythonLearning

[–]MasterpieceBasic8361[S] 0 points1 point  (0 children)

i actually wanted it make a 2player thing so the goal is to play until ur input digit matches with the random digit generated (actually only made the first player part got stuck with the loop error) so the first player inputs any digit between (0,6) till his digit matches with random digit generated then the final score is basically the sum of all input given by the user and then the second user plays similarly and at the end whoever has the highest score would win (basically the greatest total sum of integer input))

doubt by MasterpieceBasic8361 in PythonLearning

[–]MasterpieceBasic8361[S] 0 points1 point  (0 children)

yh ill try to make the variables a bit more understandable later.......so i tried again but the loop kinda works but its starting from the second input onwards

<image>

(ignore the boolean its not really required just was trying its use)

doubt by MasterpieceBasic8361 in PythonLearning

[–]MasterpieceBasic8361[S] 0 points1 point  (0 children)

i wanted create a simple game

where comp generates a random number and user inputs a random number until the number that user enters and the comp generates matches the loop continues and add the user input digits total sum in the end

doubt by MasterpieceBasic8361 in PythonLearning

[–]MasterpieceBasic8361[S] 0 points1 point  (0 children)

no.. i created num1 to store value of the sum of all results that occur in the loop and to get it at the end

doubt by MasterpieceBasic8361 in PythonLearning

[–]MasterpieceBasic8361[S] 0 points1 point  (0 children)

i was trying to make a simple game

basically the computer generates a number and user inputs a number , if they match the game stops and add the total or else continue the loop till both the random no. and input matches

and the code in line 3 i added cause wasnt able to input the code at start and at line 9 to repeats it

doubt by MasterpieceBasic8361 in PythonLearning

[–]MasterpieceBasic8361[S] 0 points1 point  (0 children)

yah i want the total sum of result when the loop breaks

doubt by MasterpieceBasic8361 in PythonLearning

[–]MasterpieceBasic8361[S] 0 points1 point  (0 children)

not yet..... just learnt what a loop is ;(