0% found this document useful (0 votes)
8 views2 pages

11 Loop Assigment

The document outlines a series of Python programming assignments for Class XI Computer Science, focusing on generating and summing various numerical sequences based on an input integer n or a floating-point number x. Each section provides specific tasks that involve loops and mathematical operations, including factorials and power series. The assignments aim to enhance students' understanding of programming concepts and their application in solving mathematical problems.

Uploaded by

Vinod Srivastava
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

11 Loop Assigment

The document outlines a series of Python programming assignments for Class XI Computer Science, focusing on generating and summing various numerical sequences based on an input integer n or a floating-point number x. Each section provides specific tasks that involve loops and mathematical operations, including factorials and power series. The assignments aim to enhance students' understanding of programming concepts and their application in solving mathematical problems.

Uploaded by

Vinod Srivastava
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Class XI Computer Science Loop Assignment for First Weekly Test

1. Write a Python script to input an integer n and generate following sequence:


a) 1, 2, 3, 4, …, (n-1), n
b) n, n-1, n-2, …, 2, 1
c) 1, 3, 5, 7, …, (2n-3), (2n-1)
d) 2, 4, 6, 8, …, (2n-2), 2n
e) 5n, 5n-5, 5n-10, …, 10, 5

2. Write a Python script to input an integer n and find the sum of the following sequence:
a) 1+2+3+4+…+(n-1)+n
b) 2+4+6+8+…+(2n-2)+2n
c) 1+3+5+7+…+(2n-3)+(2n-1)
d) 4+8+12+…+(4n-4)+4n
e) 7n+(7n-7)+(7n-14)+…+14+7

3. Write a Python script to input an integer n and find the sum of the following sequence:
a) (1)+(1+2)+(1+2+3)+ … +(1+2+3+…+n)
b) (2)+(2+4)+(2+4+6)+ … +(2+4+6+…+2n)
c) (1)+(1+3)+(1+3+5)+ … +(1+3+5+…+2n-1)
d) (5)+(5+10)+(5+10+15)+…+(5+10+15+…+5n)
e) (8)+(8+16)+(8+16+24)+…+(8+16+24+…+8n)

4. Write a Python script to input an integer n and find the sum of the following sequence:
a) 1!+2!+3!+4!+…+n!
b) 2!+4!+6!+8!+…+(2n)!
c) 1!+3!+5!+7!+…+(2n-1)!

5. Write a Python script to input a floating-point x and an integer n; find the sum of the
following sequence:
a) 1+x+x2+x3+…+xn
b) 1+x2+x4+x6+…+x2n
c) 1+x+x3+x5+…+x2n-1
1 1 1 1
d) 1+ x + 2 + 3 + …+ n
x x x

6. Write a Python script to input a floating-point x and an integer n; find the sum of the
following sequence:
2 3 n
x x x x
a) 1+ + + +…+
1! 2! 3 ! n!
2 3 n
x x x x
b) 1− + − + …(−1)n
1! 2! 3! n!
2 4 6 2n
x x x x
c) 1+ + + +…+
2! 4 ! 6 ! (2 n)!
3 5 2 n−1
x x x x
d) 1+ + + +…+
1! 3 ! 5 ! (2n−1)!

You might also like