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:Deployment diagram
Explanation: Deployment diagram is the diagram that is used for displaying the hardware parts upon which the software architecture works.The main purpose of the diagram is showing the function and operations taking place through the deployment of the software system with the hardware.
These diagrams are made up of the nodes , interface, artifacts and other components. Other given options are incorrect because architectural diagram is for designing of the architecture of a system,sequence diagram is used for the sequential order display of system components and state chart diagram is the diagram that shows the status of the parts of the operating system.
Therefore, the correct option is deployment diagram.
Dynamic random-access memory
The answer is Printer. hope this helped :)