AnswerB
Explanation:Makes since to look over the notes each night before the exam
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!
<span>Business Name (default field), State (correct field)</span>
Explanation:
calculators work by processing information in binary form. We're used to thinking of numbers in our normal base-ten system, in which there are ten digits to work with: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. The binary number system is a base-two system, which means there are only two digits to work with: 0 and 1. Thus, when you input numbers into a calculator, the integrated circuit converts those numbers to binary strings of 0s and 1s.
The integrated circuits then use those strings of 0s and 1s to turn transistors on and off with electricity to perform the desired calculations. Since there are only two options in a binary system (0 or 1), these can easily be represented by turning transistors on and off, since on and off easily represent the binary option
Once a calculation has been completed, the answer in binary form is then converted back to our normal base-ten system and displayed on the calculator's display screen.