Last answered:

27 Jul 2022

Posted on:

27 Jul 2022

0

How is the answer right of this question from course exam ?

image





How is line 5 incorrect ?
And how is line 18 correct ?

2 answers ( 0 marked as helpful)
Instructor
Posted on:

27 Jul 2022

0

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

Posted on:

27 Jul 2022

0

Okay ! I got it . Thanks!

Submit an answer