SPR can someone help me? Python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 8

SPR can someone help me? Python

I have no ideas on how to do it. I want to make a three-round game that has three inputs. I can not make the function. Can someone solve this please? https://code.sololearn.com/cG93y3Nu4js9/?ref=app

8th Jul 2018, 4:13 PM
I -_- D
I -_- D - avatar
15 Answers
8th Jul 2018, 6:34 PM
Psychoalphadiscobetabioaquadoloop
Psychoalphadiscobetabioaquadoloop - avatar
+ 6
4G3N7 thanks, I will work on it to make this better
8th Jul 2018, 6:45 PM
I -_- D
I -_- D - avatar
+ 6
Sure
8th Jul 2018, 6:47 PM
Psychoalphadiscobetabioaquadoloop
Psychoalphadiscobetabioaquadoloop - avatar
+ 5
comment/delete line 6 to 12 and also delete round
8th Jul 2018, 6:06 PM
Psychoalphadiscobetabioaquadoloop
Psychoalphadiscobetabioaquadoloop - avatar
+ 4
Paul Jacobs i saved it, it dosent work... 4G3N7 can you fix it pleas? and this how i'll learn from my mistakes....
8th Jul 2018, 6:19 PM
I -_- D
I -_- D - avatar
+ 4
The .upper() translates the input to uppercase. If you get 'r' or 'R' it will be 'R' for the program.
8th Jul 2018, 6:24 PM
Paul
Paul - avatar
+ 3
Paul Jacobs look at the code now, i change it as you say. is problem in line 18, when reading a line
8th Jul 2018, 5:12 PM
I -_- D
I -_- D - avatar
+ 3
You should keep the def (function). What I suggested came in place of lines 6 until 11.
8th Jul 2018, 6:13 PM
Paul
Paul - avatar
+ 3
It needs the function you made. The function called roumd. Do you have still have it? It needs to be before while.
8th Jul 2018, 6:21 PM
Paul
Paul - avatar
+ 3
Paul Jacobs I have no the def but i can write it again.
8th Jul 2018, 6:28 PM
I -_- D
I -_- D - avatar
+ 3
Paul Jacobs what the def get? pc and hu? like (pc,hu) ?
8th Jul 2018, 6:29 PM
I -_- D
I -_- D - avatar
+ 3
4G3N7 now you don't know who won. That was what the def round() was for.
8th Jul 2018, 6:38 PM
Paul
Paul - avatar
+ 3
I -_- D it should be the same as before.
8th Jul 2018, 6:38 PM
Paul
Paul - avatar
+ 2
Maybe use a while statement like this: x = 1 while x <= 3: cp = random.choice(blows) hu = input().upper() print(round(cp, hu)) x += 1
8th Jul 2018, 5:03 PM
Paul
Paul - avatar
+ 2
Paul Jacobs Put all this in place of the function? Once? I'll try. what is "upper" do?
8th Jul 2018, 5:08 PM
I -_- D
I -_- D - avatar