Computer Science, asked by Subatra, 1 month ago

Program 2 (6)
Create a class called Stars
void design( ) a function to print n number of stars
void design1(int j)

String design(String n ) and return it to the calling program and the calling program should print the received name and say you have got 5 star rating.

Answers

Answered by fresbie
0

inappropriate question

please resend

Answered by shilpa85475
0

void design( ) a function to print n number of stars

void design1(int j)

Explanation:

num_rows = int(input("Enter the number of rows"))

k = 0

for i in range(1, num_rows + 1):

for j in range (1, (num_rows - i) + 1):

print(end = " ")

while k != (2 * i - 1):

print("*", end = "")

k = k + 1

k = 0

print()

k = 2

m = 1

for i in range(1, num_rows):

for j in range (1, k):

print(end = " ")

k = k + 1

while m <= (2 * (num_rows - i) - 1):

print("*", end = "")

m = m + 1

m = 1

print()

Similar questions