I think it’s D. Sorry if it’s wrong
Answer:
"It is 80 cents"
Explanation:
In order to calculate how much this actually is, we would need to multiply this fraction by the value of a whole dollar which is 1. We can divide the fraction 4/5 and turn it into the decimal 0.80 which would make this much easier. Now we simply multiply...
0.80 * 1 = $0.80
Finally, we can see that 4/5 of a dollar would be 0.80 or 80 cents. Therefore Pradeep would answer "It is 80 cents"
i = 1
while i < 10001:
total = 0
x = 1
while x < i:
if i % x == 0:
total += x
x+=1
if total == i:
print(str(i)+" is a perfect number")
i += 1
When you run this code, you'll see that 6, 28, 496, and 8128 are all perfect numbers.
Answer:
Thanks but I don't want to give my pets there're all legendary
Explanation:
Answer:
10
Explanation:
An enqueue operation is a function that adds an element(value) to a queue array. A dequeue operations removes an element from a queue array. Queue arrays follow a first-in-first-out approach, so elements that are first stored in the queue are removed/accessed first(enqueue operations add elements at the rear of the queue array).
The following operations leave 10 elements in the queue of array size 12 after its done:
10 enqueue operations= adds 10 elements
5 dequeue operations= removes 5 elements( 5 elements left in queue)
6 enqueue operations= adds 6 elements(11 elements in queue)
10 dequeue operations= removes 10 elements(1 element left in queue)
8 enqueue operations= adds 8 elements(9 elements in queue)
2 dequeue operations= removes 2 elements(7 elements left in queue)
3 enqueue operations= adds 3 elements(10 elements in queue)
Therefore there are 10 elements in the queue after enqueue and dequeue operations.