0% found this document useful (0 votes)
44 views

Assignment: Course: ICP (CSC141) Class: EPE-2 Max. Marks: 25 Copied and Late Assignments Will Be Marked As Zero

This document contains instructions for an assignment with 6 questions. Students are asked to write Python programs that generate and calculate various numerical series and patterns using loops like while and do. The programs should generate the first 10 elements of series, find averages, sums, products of numbers, and skip numbers divisible by 7. Copying or late assignments will be marked zero. The assignment is out of 25 marks for an Intro to Programming Concepts course.

Uploaded by

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

Assignment: Course: ICP (CSC141) Class: EPE-2 Max. Marks: 25 Copied and Late Assignments Will Be Marked As Zero

This document contains instructions for an assignment with 6 questions. Students are asked to write Python programs that generate and calculate various numerical series and patterns using loops like while and do. The programs should generate the first 10 elements of series, find averages, sums, products of numbers, and skip numbers divisible by 7. Copying or late assignments will be marked zero. The assignment is out of 25 marks for an Intro to Programming Concepts course.

Uploaded by

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

Assignment: Course: ICP (CSC141) Class: EPE-2

Max. Marks: 25

Note: Copied and late assignments will be marked as zero.

Q1. Write a program that would generate the first 10 elements of each series. Use a separate
‘while’ loop to generate each series.
a) 1, 2, 3, 4, …
b) 1, 3, 5, 7, …
c) 1, 5, 10, 16, 23, 31, …
d) 6, 12, 18, 24, …
e) 100, 90, 80, …
Q2. Write a program that gives the average of any number of values entered by the user. The
program should terminate when the input is –1. Try to limit your program to five variables.

Q3. Write a program that finds the sum of positive numbers less than and equal to 30. The
answer should be 465.
Q4. Write a program that prints all odd positive integers less than 100, skipping those that are
exactly divisible by 7. Do this program using one variable only.
Q5. Write a program that finds the product of positive odd numbers less than 20.
Q6. Write a program that would generate the first 10 elements of each series. Use a separate ‘do’
loop to generate each series.
a) 2, 4, 6, 8, …
b) 1, 4, 9, 16, 25, 36, …
c) 1, 3, 9, 27, …
d) 50, 60, 70, …
e) 1000, 500, 250, 125, …

You might also like