Answer:
Here is the Python program:
n = int(input("Enter a positive integer n: "))
#prompts user to enter value of n and stores that value to n variable
s= 2*n # to associate 2n asterisks
asterisks = '*' # used to display asterisks
while n>0: # loop continues until n is less than or equal to 0
print(asterisks*s) #prints 2n asterisks
n = n-s # decrements value of n by s
Explanation:
This program prompts user to enter value of n. n has the positive integer value and s holds 2*n to associate 2n asterisks. asterisks variable hold asterisk that is to be displayed 2n times. The loop continues to associate asterisks with s which is 2 times the value of n and displays these asterisks on output screen. The while loop breaks when value of n is less than 0. The output is displayed in screenshot.