Assignment 9
Due on 02/05/2023
This week’s assignment focuses on the basic python programming practices.
Problem(s)
Part 1
- Write a program (WAP) to print the following pattern using python where N is the number of rows (here N = 4) in the following pattern:
* *** ***** *******
- WAP to take a number (N) from a user and print sum and products of the digits of N, without using string or lists. Eg.:
N = 1528 Sum = 16 Product = 80
Part 2
- WAP to take a list L of N numbers from user and print the running-total of L. Eg.:
N = 3 L = [12, 43, 1] Running Total = [12, 55, 56] N = 5 L = [2, 2, 3, 10, 5] Running Total = [2, 4, 7, 17, 22]