I am new to programming. I had an assignment to write a code that will output a random number between 30 and 35. This code needs to use random.seed()
, a for
statement and a multiplication. I understand that the random.seed([x])
generates an initial value that could be used in the proceeding section of the code. However, I can't figure out how to proceed after obtaining the value of the random:
import random
random.seed(70)
print(random.random()) # This returns a value of 0.909769237923872
How do I use this value to generate a random value between 30 and 35?
Note: Without the specific directions above, I have been able to write two codes that function as desired, so please I am not looking for alternative ways of writing the code.