How is the answer right of this question from course exam ?
How is line 5 incorrect ?
And how is line 18 correct ?
2 answers ( 0 marked as helpful)
Hey Swarntam,
Thank you for your question!
Just as the explanation of the correct answer reads, the command on line 5, random.seed = 365
, is not valid. The correct syntax would instead be random.seed(365)
.
Regarding line 18, an f-string is used inside the print()
function. It allows for putting values of variables inside the string itself. In this case the variable is {num_rounds}
. This line of code is correct.
Hope this helps!
Kind regards,
365 Hristina
Okay ! I got it . Thanks!