Answer:
C is the correct answer
Step-by-step explanation:
Hope this helps:)
Replace x with -4 so it would be:
f(-4)= 2(-4)=-8
-8 is your answer
Answer:
def validateID(this_id):
is_valid = 0
checksum = 0
n = int(this_id)
count=1
while(n!=0):
d=int(n%10)
if(count%2==0):
d=d*2
if(d<10):
checksum=checksum+d
else:
while(d!=0):
x = int(d%10)
checksum = checksum + x
d=int(d/10)
else:
checksum=checksum+d
count=count+1
n=int(n/10)
if(checksum%10==0):
is_valid=1
return is_valid, checksum
def main():
test_id = "176248"
is_valid, checksum = validateID(test_id)
if(is_valid==1):
print(test_id+" is valid and checksum is "+str(checksum))
else:
print(test_id+" is not valid and checksum is "+str(checksum))
test_id = "79927398713"
is_valid, checksum = validateID(test_id)
if(is_valid==1):
print(test_id+" is valid and checksum is "+str(checksum))
else:
print(test_id+" is not valid and checksum is "+str(checksum))
test_id = "6080320539447211"
is_valid, checksum = validateID(test_id)
if(is_valid==1):
print(test_id+" is valid and checksum is "+str(checksum))
else:
print(test_id+" is not valid and checksum is "+str(checksum))
return
if __name__ == '__main__':
main()
Answer:
A).Amount = $218250
B). Amount = $88700
Step-by-step explanation:
A) .$5000 in an account at age 23, and withdraw it 42 years
Number of years t= 42 years
Principal P = $5000
Rate r= 9%
Number of times compounded n= 42
A= p(1+r/n)^(nt)
A= 5000(1+0.09/42)^(42*42)
A= 5000(1+0.002143)^(1764)
A= 5000(1.002143)^1764
A= 5000(43.65)
A= 218250
Amount = $218250
B).waits 10 years before making the deposit, so that it stays in the account for only 32 years
Number of years t= 32 years
Principal P = $5000
Rate r= 9%
Number of times compounded n= 32
A= p(1+r/n)^(nt)
A= 5000(1+0.09/32)^(32*32)
A= A= 5000(1+0.0028125)^(1024)
A= 5000(1.0028125)^1024
A= 5000(17.74)
A= 88700
Amount = $88700