Thursday, 1 October 2026

๐Ÿ Python Pattern Challenge — Day 17

 


๐Ÿ Python Pattern Challenge — Day 17

Pattern printing is a great way to improve your Python loops, spacing, nested loops, and logical thinking. For Day 17, let's create a Hollow Star Diamond Pattern ⭐.

This pattern looks like a diamond from the outside, but the center remains empty. The challenge is to control the left spaces, stars, and inner spaces correctly.

Today's Challenge

Write a Python program to print:






Best and cleanest code will be rewarded! ๐Ÿ†


Solution 1 — Using Nested for Loops

n = 4 # Upper part for i in range(1, n + 1): print(" " * (n - i), end="") for j in range(2 * i - 1): print("*", end=" ") print() # Middle hollow part for i in range(3): print("* *", end=" ") print(" " * 3, end="") print("* *") # Lower part for i in range(n - 1, 0, -1): print(" " * (n - i), end="") for j in range(2 * i - 1): print("*", end=" ") print()












How it works

The first loop creates the growing upper section:

* * * * * * * * * * * * * * * * Then the middle section keeps the center empty: * * * * * * * * * * * *

Finally, the last loop creates the decreasing lower section: * * * * * * * * *







Solution 2 — Using String Multiplication

n = 4 for i in range(1, n + 1): print(" " * (n - i) + "* " * (2 * i - 1)) for i in range(3): print("* *" + " " * 3 + "* *") for i in range(n - 1, 0, -1): print(" " * (n - i) + "* " * (2 * i - 1))






Here:

"* " * (2 * i - 1)

controls the number of stars in the upper and lower sections.

And:

" " * 3

creates the empty space in the center.


Solution 3 — Using a Function

def star_pattern(n): for i in range(1, n + 1): print(" " * (n - i) + "* " * (2 * i - 1)) for _ in range(3): print("* *" + " " * 3 + "* *") for i in range(n - 1, 0, -1): print(" " * (n - i) + "* " * (2 * i - 1)) star_pattern(4)








Using a function makes the pattern reusable and allows you to experiment with different sizes.


⚡ Short & Clean Code

n = 4 for i in range(1, n + 1): print(" " * (n-i) + "* " * (2*i-1)) for _ in range(3): print("* *" + " " * 3 + "* *") for i in range(n-1, 0, -1): print(" " * (n-i) + "* " * (2*i-1))







๐Ÿ”ฅ This version keeps the logic simple while producing the complete pattern.


๐Ÿš€ Challenge Yourself

Can you modify this pattern:

  • Make the pattern larger?
  • Take the size using input()?
  • Create the same pattern using a while loop?
  • Make the center gap wider?
  • Replace * with another symbol?
  • Create a completely hollow version?

Drop your solution below! ๐Ÿ‘‡

17 Days. 17 Patterns. Stronger Python Logic. ๐Ÿ๐Ÿ”ฅ

Learn • Practice • Grow with CLCODING ๐Ÿš€


Python for Geography & Geospatial Analysis

๐Ÿ”ฅ September Data Science Bootcamp-Day 1 to Day 22 — From Python to Data Science.





September Data Science Bootcamp: Day 1 to Day 22 — From Python to a Final Project

Learning Data Science is not just about learning Machine Learning algorithms. A strong Data Science foundation starts with programming, logic building, data handling, visualization, statistics, exploratory analysis, and finally Machine Learning.

The September Data Science Bootcamp is a structured 22-day learning journey designed to take learners from Python fundamentals to a practical final project.

The journey follows a simple approach:

Learn → Practice → Analyze → Visualize → Build


๐Ÿ Day 1 — Introduction to Python

https://youtube.com/live/e_CnSJQkdDM?feature=share

The bootcamp begins with Python, one of the most widely used programming languages for Data Science.

Day 1 focuses on building a basic understanding of Python programming and creating a strong foundation for the upcoming sessions.


๐Ÿง  Day 2 — Logic Building with Python

https://youtube.com/live/A_d8ATi-03Q?feature=share

Programming is not only about syntax. The ability to think logically and break a problem into smaller steps is equally important.

Day 2 focuses on logic building with Python, helping learners understand how to approach programming problems and develop solutions step by step.


๐Ÿ—‚️ Day 3 — Python Data Structures

https://youtube.com/live/HQy8ughhFbo?feature=share

Data structures are essential for storing and organizing information.

This session focuses on important Python data structures and how they can be used to store, access, and manipulate data efficiently.

Understanding these concepts also prepares learners for working with libraries such as NumPy and Pandas.


๐Ÿ”„ Day 4 — Loops & Comprehensions

https://youtube.com/live/FCIgLN33oVI?feature=share


Loops allow programmers to perform repetitive tasks efficiently.

Day 4 focuses on Python loops and comprehensions, helping learners understand iteration and concise ways of creating and processing collections.

These concepts are especially useful when working with large amounts of data.


⚙️ Day 5 — Python Functions

https://youtube.com/live/1PENRkAmOxg?feature=share

Functions make Python programs more organized, reusable, and easier to maintain.

In this session, learners explore Python functions and understand how larger problems can be divided into smaller reusable blocks of code.


๐Ÿ› ️ Day 6 — Python Exception Handling & File Handling

https://youtube.com/live/HTYbKVl2KFU?feature=share

Real-world applications need to deal with errors and external files.

Day 6 covers two important Python skills:

Exception Handling helps programs handle unexpected situations gracefully.

File Handling allows Python programs to read from and write to files.

These are important skills for developing practical Python applications.


๐Ÿงฉ Day 7 — Python OOP Essentials for Beginners

https://youtube.com/live/SeX9wHN88pE?feature=share

Object-Oriented Programming introduces a structured way to organize Python programs.

Day 7 focuses on the fundamentals of Python OOP, including concepts such as classes, objects, methods, and object-oriented thinking.

This provides a foundation for understanding larger Python applications and frameworks.


๐Ÿ”ข NumPy & Pandas

https://youtube.com/live/TFDk3f4CYUc?feature=share

After building a Python foundation, the bootcamp moves toward the libraries commonly used for numerical computing and data analysis.


๐Ÿ”ข Day 8 — NumPy Fundamentals for Data Science

https://youtube.com/live/TFDk3f4CYUc?feature=share

NumPy is one of the core libraries in the Python Data Science ecosystem.

Day 8 introduces the fundamentals of NumPy and its array-based approach to numerical computing.

NumPy provides efficient tools for working with numerical data and forms an important foundation for many other Data Science libraries.


⚡ Day 9 — NumPy for Computing

https://youtube.com/live/LcjnTMtX3OA?feature=share

Day 9 continues the NumPy journey with a focus on computing and numerical operations.

Working with arrays efficiently is an important skill for scientific computing, data analysis, and Machine Learning.


๐Ÿผ Day 10 — Python Pandas Fundamentals


https://youtube.com/live/z6PICX2J81E?feature=share

Pandas is one of the most important Python libraries for data analysis.

Day 10 introduces the fundamentals of Pandas and its DataFrame-based approach to working with structured datasets.

With Pandas, we can inspect, manipulate, transform, and analyze data in a convenient way.


๐ŸŽฏ Day 11 — Data Selection in Python

https://youtube.com/live/H_H9i-Yq53w?feature=share

Before analyzing data, we need to select the information that is actually relevant.

Day 11 focuses on Data Selection in Python, including selecting required rows, columns, and data based on conditions.

This is an important step in practical data analysis.


๐Ÿงน Day 12 — Data Cleaning in Python

https://youtube.com/live/tQYjD98Nv98?feature=share

Real-world datasets are rarely perfect.

They may contain missing values, duplicate records, inconsistent formats, or unwanted information.

Day 12 focuses on Data Cleaning in Python, helping prepare raw data for meaningful analysis.

A clean dataset leads to more reliable analysis and better results.


๐Ÿš€ Day 13 — Advanced Pandas in Python

https://youtube.com/live/LJMC_gFC_0E?feature=share

Once the Pandas fundamentals are clear, the next step is advanced data manipulation.

Day 13 focuses on Advanced Pandas, allowing learners to work with more complex data-wrangling and analysis tasks.

This stage strengthens the ability to work with real-world datasets.


๐Ÿ“Š Data Visualization

https://youtube.com/live/7aLQMujfAqo?feature=share

Data is much easier to understand when patterns are represented visually.

The next part of the bootcamp focuses on visualization.


๐Ÿ“ˆ Day 14 — Matplotlib Basics


https://youtube.com/live/7aLQMujfAqo?feature=share

Matplotlib is one of the fundamental visualization libraries in Python.

Day 14 introduces Matplotlib Basics and shows how data can be represented using different types of charts and plots.

Visualization helps us identify trends, comparisons, distributions, and patterns that may not be obvious from raw numbers.


๐ŸŽจ Day 15 — Seaborn

https://youtube.com/live/bFLyx4DjmW8?feature=share

Seaborn is a Python visualization library designed particularly for statistical graphics.

Day 15 focuses on Seaborn and how it can be used to create informative and attractive visualizations for Data Science and exploratory analysis.


๐Ÿ“ Statistics for Data Science


Data Science also requires statistical thinking.

The next two sessions introduce important statistical concepts.


๐Ÿ“Š Day 16 — Descriptive Statistics Made Easy

https://youtube.com/live/Cj5G4JZi6TY?feature=share

Descriptive statistics help us summarize and understand datasets.

Important concepts include:

  • Mean
  • Median
  • Mode
  • Range
  • Variance
  • Standard Deviation
  • Percentiles

These measures help us understand the central tendency and spread of data.


๐ŸŽฒ Day 17 — Probability & Inferential Statistics for Data Science

https://youtube.com/live/JKS8pdJ6xfo?feature=share

Probability helps us understand uncertainty, while inferential statistics helps us draw conclusions from data.

Day 17 focuses on Probability and Inferential Statistics for Data Science, including concepts related to hypothesis testing and p-values.

These concepts provide an important statistical foundation for data-driven analysis.


๐Ÿ” Exploratory Data Analysis

After learning Python, data manipulation, visualization, and statistics, the bootcamp moves toward Exploratory Data Analysis (EDA).


๐Ÿ”Ž Day 18 — EDA Fundamentals

https://youtube.com/live/tdigtc_CTAo?feature=share

EDA is the process of exploring a dataset to understand its structure, patterns, relationships, distributions, and unusual observations.

Day 18 introduces the fundamentals of EDA and shows how statistical techniques and visualizations can be combined to understand data.


๐Ÿงช Day 19 — Complete EDA Workflow

https://youtube.com/live/onPpGCnWHKc?feature=share

Day 19 brings the EDA concepts together into a complete workflow.

A typical EDA process can be represented as:

Understand → Clean → Explore → Visualize → Analyze → Find Insights

The goal is to move beyond individual Python commands and understand how a Data Scientist approaches a dataset systematically.


๐Ÿค– Day 20 & 21 — Machine Learning

https://youtube.com/live/ncA5j_6qlXQ?feature=share

The bootcamp then moves into Machine Learning.

By this stage, learners have already developed a foundation in Python, NumPy, Pandas, visualization, statistics, and EDA.

These skills provide the groundwork for understanding Machine Learning workflows.

Day 20 and Day 21 focus on Machine Learning concepts and the process of working with models and data.

The basic idea is simple:

Give a model data → Let it learn patterns → Evaluate the results.


๐Ÿ† Day 22 — The Final Day: Project

https://youtube.com/live/WjPqBoaW4is?feature=share

The final day brings the entire learning journey together.

Day 22 is the Final Project, where the concepts learned throughout the bootcamp can be connected into a practical Data Science workflow.

The journey now looks like:

Python → NumPy → Pandas → Data Selection → Data Cleaning → Visualization → Statistics → EDA → Machine Learning → Project

This final stage demonstrates how individual concepts can work together to solve a complete Data Science problem.


๐Ÿš€ From Python to Data Science

The biggest value of this bootcamp is the progression.

Instead of jumping directly into Machine Learning, the journey first builds the programming and data-analysis skills needed to understand what happens behind the models.

By the end of the 22-day journey, learners have explored the major building blocks of a practical Data Science workflow.

Python

↓

Data Structures & Programming

↓

NumPy

↓

Pandas

↓

Data Cleaning

↓

Visualization

↓

Statistics

↓

EDA

↓

Machine Learning

↓

Final Project

https://github.com/pythonclcoding/September-Data-Science-Bootcamp-/blob/main/september_bootcamp/day%208.ipynb

๐ŸŽฏ Final Takeaway

22 Days. One Complete Journey.

From writing your first Python programs to working with data, creating visualizations, understanding statistics, exploring datasets, learning Machine Learning, and completing a final project — the September Data Science Bootcamp provides a structured path through the core stages of Data Science.

Learn the fundamentals. Practice with code. Work with data. Build projects.

๐Ÿ”ฅ September Data Science Bootcamp


Popular Posts

Categories

100 Python Programs for Beginner (119) AI (346) Android (25) AngularJS (1) Api (7) Assembly Language (2) aws (31) Azure (12) BI (10) book (1) Books (359) Bootcamp (15) C (78) C# (12) C++ (83) cloud (1) Course (93) Coursera (305) Cybersecurity (36) data (10) Data Analysis (47) Data Analytics (31) data management (16) Data Science (435) Data Strucures (19) Deep Learning (222) Django (16) Downloads (3) edx (21) Engineering (15) Euron (30) Events (9) Excel (24) Finance (13) flask (4) flutter (1) FPL (17) Generative AI (78) Git (13) Google (55) Hadoop (3) HTML Quiz (1) HTML&CSS (48) IBM (43) IoT (3) IS (25) Java (99) Leet Code (4) Machine Learning (407) Meta (24) MICHIGAN (5) microsoft (13) Nvidia (8) Pandas (16) PHP (20) Projects (35) Python (1377) Python Coding Challenge (1261) Python Library (15) Python Mathematics (19) Python Mistakes (51) Python Pattern Challenge (15) Python Quiz (646) Python Tips (112) Questions (3) R (72) React (7) Scripting (3) security (4) Selenium Webdriver (4) Software (21) SQL (55) Udemy (22) UX Research (1) web application (11) Web development (9) web scraping (3)

Followers

Python Coding for Kids ( Free Demo for Everyone)