Answer:
(a) someFunc(3) will be called 4 times.
(b) For non negative number n someFunc method calculates 2^2^n.
Explanation:
When you call someFunc(5) it will call someFunc(4) two time.
So now we have two someFunc(4) now each someFunc(4) will call someFunc(3) two times.Hence the call to someFun(3) is 4 times.
someFunc(n) calculates someFunc(n-1) two times and calculates it's product.
someFunc(n) = someFunc(n-1)^2..........(1)
someFunc(n-1)=someFunc(n-2)^2..........(2)
substituting the value form eq2 to eq 1.
someFunc(n)=someFunc(n-2)^2^2
.
.
.
.
= someFunc(n-n)^2^n.
=2^2^n
2 raised to the power 2 raised to the power n.
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 privacy data breach occurs when personal information is stolen or lost or is collected, used or disclosed without authority. A privacy breach occurs when personal information is stolen or lost or is collected, used or disclosed without authority.
Explanation:
Examples of a data breach might include:
Loss or theft of hard copy notes, USB drives, computers or mobile devices. an unauthorized person gaining access to your laptop, email account or computer network. sending an email with personal data to the wrong person.