
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Homework 4
๐
๐
By formula
โซ
๐
๐
๐(๐ฅ)๐๐ฅ โ
ฮ๐ฅ
3
โ
๐= 1
๐/ 2
[๐(๐ฅ
2 ๐โ 2
) + 4 ๐(๐ฅ
2 ๐โ 1
) + ๐(๐ฅ
2 ๐
)]
=
ฮ๐ฅ
3
[๐
( ๐ฅ
0
)
๐= 1
๐/ 2
๐(๐ฅ
2 ๐โ 1
) + 2 โ
๐= 1
๐/ 2 โ 1
๐(๐ฅ
2 ๐
) + ๐
( ๐ฅ
๐
) ],
where a,b, and even number n from the user (Donโt use if statement.)
or invalid by the Luhn algorithm (https://en.wikipedia.org/wiki/Luhn_algorithm)
2
๐โ 1
. For x and n from the user, calculate
A(x).
from the user, calculate A(x,y).