0

Can you please solve this?

Two friends want to play backgammon, but have lost the dice. Create a program to replace the dice. When the program is run, it should roll the dice and output the result of each die. You will see a random.seed(int(input())) line in sample code. It initializes the pseudorandom number generator and, in this case, ensures functionality of test cases. https://code.sololearn.com/cUw82b53YXS5/?ref=app

14th Sep 2020, 11:55 AM
Name
Name - avatar
6 Respostas
+ 3
Here you go. I struggled a lot to solve this problem. import random #import random module random.seed(int(input())) #please don't touch this lane # you dont need separate for loop because this # statement will work which accept an integer dice1 = random.randint(1,6) dice2 = random.randint(1,6) print(dice1) print(dice2)
17th Mar 2021, 8:53 PM
Somnath Das
Somnath Das - avatar
+ 1
import random random.seed(int(input())) dice1 = random.randint(1, 6) dice2 = random.randint(1, 6) print(dice1) print(dice2) try this code
8th Oct 2021, 5:09 PM
Raoof Zakarna
0
If you have no idea I suggest you reviewing the lesson https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2438/
14th Sep 2020, 12:05 PM
你知道規則,我也是
你知道規則,我也是 - avatar
0
Use random randint to generate a random number: random.randint(1, 6)
14th Sep 2020, 12:06 PM
Bagon
Bagon - avatar
0
what is random. seed
14th Sep 2020, 12:07 PM
Name
Name - avatar
0
import random random.seed(int(input())) dice1 = random.randint(1, 6) dice2 = random.randint(1, 6) print(dice1) print(dice2)
20th Oct 2022, 4:02 AM
Sumit Prajapati
Sumit Prajapati - avatar