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
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
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
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.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!