The pseudocode to find the sum of all integers that are multiples of 9, from 1 to 250.
totalSum = 0
for i from 1 to 250{
if i is divided by 9 and remainder is 0{
totalSum = totalSum + i;
}
}
print(totalSum)
in python language the code will be
totalSum = 0
for i in range(1,250):
if i%9==0:
totalSum += i
If you will run the program , the answer would be 3402.
ANSWER:
Minerals can form deep inside earth's crust by the crystallization of melted materials. There are two ways on how minerals are formed: crystallization of melted materials and the crystallization of materials dissolved in water.
Hope this helps!
Answer:
True: In binary search algorithm, we follow the below steps sequentially:
Input: A sorted array B[1,2,...n] of n items and one item x to be searched.
Output: The index of x in B if exists in B, 0 otherwise.
- low=1
- high=n
- while( low < high )
- { mid=low + (high-low)/2
- if( B[mid]==x)
- {
- return(mid) //returns mid as the index of x
- }
- else
- {
- if( B[mid] < x) //takes only right half of the array
- {
- low=mid+1
- }
- else // takes only the left half of the array
- {
- high=mid-1
- }
- }
- }
- return( 0 )
Explanation:
For each iteration the line number 11 or line number 15 will be executed.
Both lines, cut the array size to half of it and takes as the input for next iteration.
Smaller down and monthly payments than leasing a car
Option A.
<u>Explanation:</u>
If you lease a car, then the amount of money that a person has to pay in the form of monthly payments and installments is less when compared to when a person owns a car.
When you own a car, the monthly payment made is more than the monthly payments compared to when the car has to be leased. This is the disadvantage of owning a car, that the payment is more to be made.
Answer: The function Stella can use to calculate the periodic payments of a loan is:
The Excel PMT function or NPER function.
Explanation: 1. The Excel PMT function is a financial function that returns the periodic payment for a loan.
2. The NPER function to figure out payments for a loan, given the loan amount, number of periods, and interest rate.