Write programs to print the following shapes:
** ** * ** **
9 Likes
n = 3 # number of rows # upper half for i in range(n) : for k in range(i+1) : print('*', end = ' ') print() # lower half for i in range(n-1) : for k in range(n-1, i, -1) : print('*', end = ' ') print()
* * * * * * * * *
Answered By
4 Likes
** ** ** ** ** **
* * ** * * * *
Write programs to find the sum of the following series:
x + x2/2 + x3/3 + …… + xn/n (Input x and n both)