Python Program

Python Star Pattern | Create 1 star

In this blog we will be going through an interesting program i.e., printing a start pattern using python programming language. We need to provide the column count and based on which stars are printed.

So let’s break down our program and understand line by line.

There are just two steps in which you can accomplish this task.

capture the number of rows

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

run the for loop based on the number provided by user

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

and then print it on the screen that’s it !!!

print("*" * i)

Python Star Pattern will be printed by the following code.

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

for i in range(1, rows + 1):
    print("*" * i)

Abhishek

Share
Published by
Abhishek

Recent Posts

HTML: The Evolution and Power of Unleashed Web Language and Modern too

IntroductionInitial StagesEvolutionChallenging Other LanguagesCurrent TrendsAI and HTMLConclusion Introduction HTML, or HyperText Markup Language, is the…

3 months ago

Increase in 80C in Budget 2024 ?

Increase in 80CDemands and Discussions: Increase in 80C Section 80C of the Income Tax Act…

4 months ago

ChatGPT 4o Unleashing the Power of GPT A Comprehensive Guide

IntroductionWhat is ChatGPT-4?Key Features of ChatGPT-4Enhanced Natural Language UnderstandingImproved Response GenerationVersatilityApplications of ChatGPT-4Customer SupportContent CreationEducational…

6 months ago

APJ Abdul Kalam Biography: A Tribute to India’s Powerful Missile Man

APJ Abdul Kalam Biography :Childhood :Academics :Professional Career :Achievements : APJ Abdul Kalam Biography :…

9 months ago

Srinivasa Ramanujan Biography: Exploring the Genius

We value your feedback! Please share your thoughts on this blog on Srinivasa Ramanujan Biography…

9 months ago

Interim Budget 2024: What to Expect Any Rise

Interim Budget 2024 :Importance :Key Points :Rise in 80 C ?Standard Deduction : Interim Budget…

10 months ago

This website uses cookies.