Answer:
i) The time taken for 1500 records = 15 seconds.
ii) The time taken for 1500 records = 50 seconds.
Explanation:
A is an O(n) algorithm.
An algorithm with O(n) efficiency is described as a linearly increasing algorithm, this mean that the rate at which the input increases is linear to the time needed to compute that algorithm with n inputs.
From the question, it is given that for 1000 records, the time required is: 10 seconds.
Algorithm time taken is O(n)
Hence,
1) For 1,500 records
=> 10/1000 = x/1500
=> 10x1500/1000 = x
x = 15 seconds
Thus, the time taken for 1500 records = 15 seconds.
2) For 5,000 records
=> 10/1000 = x/5000
=> 10x5000/1000 = x
x = 50 seconds
Thus, the time taken for 1500 records = 50 seconds.
Task 1:
float75 = float(75)
string75 = "75"
# you cannot add together a number and a string because a string has no inherent numerical value like a number does.
Task 2:
num = float(input("Enter a number"))
print(num**2)
Task 3:
num = int(input("Enter an integer: "))
print("When you divide "+str(num)+" by 7, the quotient is "+str(num//7)+" and the remainder is "+str(num%7)+".")
Task 4:
gigs = int(input("How many gigabytes does your flashdrive hold? "))
print("A flashdrive with "+str(gigs)+ " gigabyte(s) holds "+str(gigs*8589934592)+" bit(s).")
For task 4, you might have to change the number 8589934592 to something else. I'm not entirely sure how many bits are in a gigabyte. I hope this helps though.
Answer: it depends if the news is on the news and someone rights an article about it and says some mislead details that's how u know its fake
Explanation: