Page 1 of 1

5. Using Python. Input an integer n. Write a program to calculate Sn = Sn=1- 2+3-4+5-6...+x*n, here the coefficient of n

Posted: Fri Apr 29, 2022 6:38 am
by answerhappygod
5 Using Python Input An Integer N Write A Program To Calculate Sn Sn 1 2 3 4 5 6 X N Here The Coefficient Of N 1
5 Using Python Input An Integer N Write A Program To Calculate Sn Sn 1 2 3 4 5 6 X N Here The Coefficient Of N 1 (5.34 KiB) Viewed 30 times
5. Using Python. Input an integer n. Write a program to calculate Sn = Sn=1- 2+3-4+5-6...+x*n, here the coefficient of n is x. x=1or-1, which depending on the parity of n. If n is odd, then x=1, else x=-1.