Hello,
I'm new to python and this is my first post.
I'm trying to write a function that would need me to print a triangle made of "*"s
Here is my program:
I apologize if this is a really easy fix, but I have only been coding for 1 week now. So I could use all the help I can get.
Thank you!!
I'm new to python and this is my first post.
I'm trying to write a function that would need me to print a triangle made of "*"s
Here is my program:
# Type your code here n = int(input("Enter a positive integer greater than or equal to 3: ")) count = 1 star = "*" for x in range(0, n): print(star*count) count += 1 print() count_ = n-1 star_ = "*" for a in range(0,n-1): print(star_*count_) count_ -= 1 print()When I print it for the value of 6, I get the following:
Output:Enter a positive integer greater than or equal to 3: 6
*
**
***
****
*****
******
*****
****
***
**
*
My question is, how do I remove that empty line between where the first function ends and the new one begins?I apologize if this is a really easy fix, but I have only been coding for 1 week now. So I could use all the help I can get.
Thank you!!