import random
def random_number_file_writer(nums):
f = open("random.txt", "w")
i = 0
while i < nums:
f.write(str(random.randint(1,500))+"\n")
i += 1
f.close()
def random_number_file_reader():
f = open("random.txt", "r")
total = 0
count = 0
for x in f.readlines():
total += int(x)
count += 1
print("The total of the numbers is "+str(total))
print("The number of random numbers read from the file is "+str(count))
def main():
random_number_file_writer(int(input("How many random numbers do you want to generate? ")))
random_number_file_reader()
main()
I hope this helps!
Answer:
a parameter is fixed over time, while an exogenous variable is allowed to change over time.
Explanation:
A parameter can be defined as a value that can be passed to a function. Thus, a parameter refers to a value that must be passed into a function, subroutine or procedure when it is called.
This value can be passed to a function either by reference or by value.
Basically, parameters can serve as a model for a function; when used as an input, such as for passing a value to a function and when used as an output, such as for retrieving a value from the same function.
A variable can be defined as a placeholder or container for holding a piece of information that can be modified or edited. Thus, a variable stores information which is passed from the location of the method call directly to the method that is called by the program.
An exogenous variable can be defined as a that's independent of other variables in a system i.e it's not affected by other variables.
This ultimately implies that, the difference between a parameter and an exogenous variable is that a parameter is fixed over time, while an exogenous variable is allowed to change over time and as such it has a relationship with other variables in a system.
Answer:
Boolean
Explanation:
If statement condition always returns true or false,which is a boolean data type.
X is true or false
it maybe a variable or an expression.
Answer:
fiikslid wugx uesbuluss wuz euzsbwzube