Answer:
The output is: Your cost is 100
Explanation:
Given
The above code snippet
and

Required
Determine the output of the code
if cost < 70 or cost > 150
The above condition checks if cost is less than 70 or cost is greater than 150
This condition is false because 100 is neither less than 70 nor is it greater than 150
So, the else statement will be executed.
discount = cost
Which means
discount = 100
So, the print instruction will print: Your cost is 100
Answer:
open-source
Explanation:
open-souce software allows any user to submit modifications of the source code
Answer:
Explanation:
Monitor is an electronic device that retrieves, and processes shows you what is going on in the computer.
Desktop is the first image you see on your screen when the computer is is used for telling the computer what to do.
keyboard
is used for typing documents. Printer is used for putting documents on paper. CD Bay you can insert a CD or Compact Disc. is is box inside and shaped
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!