Thursday, 6 March 2025

Advanced scikit-learn: Take Your ML Skills to the Next Level!

 


1️⃣ Feature Scaling & Normalization

  • Many ML models perform better with scaled data!
from sklearn.preprocessing import StandardScaler
scaler = StandardScaler() X_train_scaled = scaler.fit_transform(X_train)
X_test_scaled = scaler.transform(X_test)

2️⃣ Hyperparameter Tuning with GridSearchCV

  • Find the best model parameters automatically!

from sklearn.model_selection import GridSearchCV
params = {'n_estimators': [50, 100, 150]}
grid = GridSearchCV(RandomForestClassifier(), param_grid=params, cv=5)
grid.fit(X_train, y_train)
print(grid.best_params_)

3️⃣ Cross-Validation for Reliable Evaluation


from sklearn.model_selection import cross_val_score
scores = cross_val_score(model, X_train, y_train, cv=5)
print("Average accuracy:", scores.mean())

4️⃣ Dimensionality Reduction with PCA

  • Reduce dataset features while retaining information

from sklearn.decomposition import PCA
pca = PCA(n_components=2)
X_reduced = pca.fit_transform(X_train)

5️⃣ Handling Imbalanced Datasets with SMOTE

  • When one class has way more samples than another

from imblearn.over_sampling import SMOTE
smote = SMOTE()
X_resampled, y_resampled = smote.fit_resample(X_train, y_train)

6️⃣ Model Pipelines for Automation

  • Combine preprocessing & training into one pipeline!

from sklearn.pipeline import Pipeline
pipe = Pipeline([('scaler', StandardScaler()), ('model', RandomForestClassifier())])
pipe.fit(X_train, y_train)

7️⃣ Feature Selection to Improve Performance


from sklearn.feature_selection import SelectKBest, f_classif
selector = SelectKBest(score_func=f_classif, k=2)
X_new = selector.fit_transform(X_train, y_train)

8️⃣ Deploying ML Models with Joblib

  • Save & reload your trained models!
import joblib
joblib.dump(model, 'model.pkl')
model = joblib.load('model.pkl')

Mastering scikit-learn: A Thread for Beginners!


 1️⃣ What is scikit-learn?

  • A powerful Python library for Machine Learning (ML)
  • Built on NumPy, SciPy & Matplotlib
  • Used for classification, regression, clustering & more!

2️⃣ Installation


pip install scikit-learn

(Make sure you have NumPy & SciPy installed!)

3️⃣ Load a Dataset

from sklearn.datasets import load_iris
data = load_iris()
print(data.keys()) # View dataset keys

4️⃣ Splitting Data for Training & Testing


from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(data.data, data.target, test_size=0.2)

5️⃣ Training a Model (RandomForest)


from sklearn.ensemble import RandomForestClassifier
model = RandomForestClassifier()
model.fit(X_train, y_train)

6️⃣ Making Predictions


predictions = model.predict(X_test)
print(predictions)

7️⃣ Checking Model Accuracy


from sklearn.metrics import accuracy_score
print(accuracy_score(y_test, predictions))

8️⃣ Other ML Models in scikit-learn:

  • LogisticRegression() for classification
  • DecisionTreeClassifier() for decision trees
  • KMeans() for clustering


Python Coding Challange - Question With Answer(01060325)

 


Step-by-Step Execution

  1. Initialize num

    • num = 2 (This sets num to 2 before the loop starts.)
  2. Start the while loop

    • The loop runs as long as num < 7.
  3. Loop Iteration Details

    • First Iteration:
      • num += 2 → num = 2 + 2 = 4
      • print(num) → Output: 4
    • Second Iteration:
      • num += 2 → num = 4 + 2 = 6
      • print(num) → Output: 6
    • Third Iteration:
      • num += 2 → num = 6 + 2 = 8
      • print(num) → Output: 8
  4. Exit Condition

    • Now, num = 8, which is not less than 7, so the loop stops.

Final Output

4
6
8

Wednesday, 5 March 2025

API Design and Fundamentals of Google Cloud's Apigee API Platform


 API Design and Fundamentals of Google Cloud's Apigee API Platform

APIs (Application Programming Interfaces) have become the backbone of modern digital applications, enabling seamless integration between different services, applications, and systems. As organizations adopt hybrid and multi-cloud environments, managing APIs efficiently becomes crucial. Google Cloud's Apigee API Platform provides a comprehensive suite of tools for API design, security, analytics, and governance, making it a preferred choice for enterprises.

Understanding API Design

API design focuses on creating APIs that are consistent, scalable, and secure while providing an excellent developer experience. Here are the key principles of API design:

1. RESTful API Design

Apigee primarily supports RESTful APIs, which follow these principles:

Resource-Oriented URLs: Keep URLs intuitive (e.g., /users/{id} instead of /getUser?id=123).

Statelessness: Each request from a client contains all necessary information without relying on server state.

Standard Methods: Use HTTP methods like GET, POST, PUT, DELETE consistently.

JSON as Default Data Format: Ensure APIs use a widely accepted format like JSON for better interoperability.

2. API Versioning

As APIs evolve, versioning prevents breaking changes. Apigee supports different versioning strategies, such as:

URI Versioning (e.g., /v1/products vs. /v2/products)

Query Parameters (e.g., /products?version=1.0)

Custom Headers (e.g., Accept: application/vnd.company.v1+json)

3. Authentication & Authorization

Security is crucial in API design. Apigee enforces authentication methods like:

OAuth 2.0 – For secure authorization between client apps and APIs.

API Keys – For identifying and controlling access to API consumers.

JWT (JSON Web Tokens) – For transmitting user authentication details securely.

Mutual TLS (mTLS) – For encrypted API communication.

4. Rate Limiting & Throttling

To protect APIs from abuse, Apigee enables rate limiting and throttling to:

Restrict excessive API calls per user.

Prevent denial-of-service (DoS) attacks.

Optimize backend performance by limiting concurrent requests.

5. API Documentation & Developer Experience

A well-documented API improves adoption. Apigee provides a developer portal where:

Developers can explore API specifications, sample requests, and responses.

API providers can publish interactive documentation and tutorials.

API consumers can register, test, and integrate APIs quickly.

What you'll learn

  • Explore and put into practice API design, development and management concepts.
  • Describe the fundamentals of REST API design.
  • Describe API products, API product strategies, and how to publish APIs to a developer portal.
  • Describe Apigee terminology and organizational model based on Apigee product capabilities.

Fundamentals of Google Cloud's Apigee API Platform

Apigee offers an enterprise-grade API management platform that helps organizations design, deploy, secure, and analyze APIs. Below are its key components:

1. API Proxies

Apigee allows developers to create API proxies, which act as intermediaries between backend services and external consumers. This provides:

  • Abstraction – Hides the complexity of backend services.
  • Security Layer – Adds authentication, logging, and traffic control.
  • Policy Enforcement – Ensures API governance and compliance.

2. Traffic Management

Apigee helps optimize API traffic through:

  • Rate Limiting & Quotas – Controls API access based on user tiers.
  • Caching – Stores responses to reduce load on backend systems.
  • Load Balancing – Distributes API traffic efficiently across multiple servers.

3. Security & Access Control

Apigee ensures robust API security with:

  • OAuth, JWT, and API Key authentication
  • Role-Based Access Control (RBAC) for managing API access permissions.
  • Threat Protection Policies to mitigate risks such as SQL injections, XML threats, and DDoS attacks.

4. API Monetization

Organizations can monetize their APIs by implementing:

  • Subscription-based pricing models
  • Usage-based billing with API metering
  • Freemium plans to attract new developers while charging for premium features

5. Hybrid & Multi-Cloud Deployment

Apigee enables flexible API deployment across:

  • On-Premises Data Centers – For organizations requiring data sovereignty.
  • Public Cloud (Google Cloud, AWS, Azure) – To leverage scalability and performance.
  • Hybrid Cloud Environments – Combining on-prem and cloud infrastructure for better control.

6. API Analytics & Monitoring

With Apigee’s built-in analytics, businesses can track:

  • API usage trends and traffic patterns.
  • Response times and error rates for performance optimization.
  • Consumer insights to understand how APIs are being used.
  • Real-time logging and integration with Google Cloud Operations Suite (formerly Stackdriver).

Why Use Apigee for API Management?

Google Cloud’s Apigee API platform offers several advantages for enterprises:

Enterprise-Grade Security – Protects APIs from threats and unauthorized access.

Scalability – Handles high traffic loads efficiently.

Flexible Deployment – Works in cloud, on-prem, or hybrid environments.

Monetization Capabilities – Helps businesses generate revenue from APIs.

Comprehensive Analytics – Provides deep insights into API performance and usage.


Who Should Learn Apigee API Design?

This specialization is beneficial for:

API Developers & Architects – To design and deploy secure, high-performing APIs.

Cloud Engineers & DevOps Professionals – To manage API gateways and hybrid deployments.

Business Leaders & Product Managers – To leverage API strategies for business growth.

IT Security Teams – To implement secure API governance policies.

Join Free : API Design and Fundamentals of Google Cloud's Apigee API Platform

Conclusion

APIs play a critical role in digital transformation, enabling seamless connectivity between applications, systems, and services. Google Cloud’s Apigee API Platform provides a powerful, enterprise-ready solution for API management, offering tools for design, security, traffic control, analytics, and monetization.

Mastering API design and Apigee fundamentals allows businesses to build scalable, secure, and high-performing APIs while ensuring a seamless developer experience. Whether you're an API developer, cloud architect, or enterprise leader, learning Apigee will empower you to create and manage APIs effectively in modern cloud environments

Managing Google Cloud's Apigee API Platform for Hybrid Cloud Specialization

 


As businesses increasingly adopt hybrid and multi-cloud strategies, managing APIs effectively becomes crucial. Google Cloud’s Apigee API Platform offers a robust solution for designing, securing, and scaling APIs across hybrid cloud environments. The Managing Google Cloud's Apigee API Platform for Hybrid Cloud Specialization is designed to equip professionals with the necessary expertise to leverage Apigee’s capabilities in a hybrid cloud setup.

Understanding API Management in a Hybrid Cloud Environment

A hybrid cloud consists of on-premises infrastructure combined with one or more public cloud environments. In such a setup, API management ensures:

Seamless Integration: APIs enable communication between on-premises and cloud applications.

Security & Compliance: Protecting data and ensuring regulatory compliance.

Scalability & Performance: Managing API traffic efficiently.

Analytics & Monitoring: Gaining insights into API usage and optimizing performance.

Google Cloud’s Apigee API Management Platform is built to address these challenges effectively by providing an enterprise-grade API management solution that supports both cloud-native and hybrid deployments.

Key Features of Apigee API Platform

1. API Gateway & Traffic Management

Apigee acts as an API gateway, providing intelligent traffic management by routing API requests efficiently, enforcing policies, and ensuring load balancing. This enables organizations to optimize API performance while maintaining security and control over traffic.

2. Security & Access Control

Supports industry-standard authentication mechanisms such as OAuth 2.0, JWT, API keys, and mutual TLS.

Provides fine-grained role-based access control (RBAC) to ensure secure API exposure.

Incorporates threat detection and bot mitigation to safeguard APIs from malicious attacks.

3. Hybrid Deployment Flexibility

Enables organizations to run Apigee API gateways in their on-premises data centers while still leveraging Google Cloud’s advanced analytics and management features.

Supports multi-cloud environments, allowing enterprises to distribute API traffic across different cloud providers.

Provides Kubernetes-based Apigee hybrid deployment for seamless API management across cloud and on-prem infrastructure.

4. Developer Portal & API Monetization

Offers an integrated developer portal where developers can explore, subscribe to, and consume APIs.

Supports API monetization strategies by enabling organizations to create tiered pricing models, metering API usage, and integrating with billing platforms.

Provides API documentation and testing tools to enhance developer experience and productivity.

5. Observability & Monitoring

Delivers real-time API analytics with insights into API traffic, response times, error rates, and consumer behavior.

Integrates with tools like Google Cloud Logging and Cloud Monitoring for centralized observability.

Provides intelligent API monitoring with anomaly detection and alerting capabilities to proactively identify performance issues.

What you'll learn

  • Learn the Apigee hybrid architecture, terminology and organizational model. Learn how to install Apigee hybrid on Google Kubernetes Engine.
  • Learn how to manage and scale Apigee hybrid runtime environments, the API proxy deployment process, and how hybrid data and services are secured.
  • Learn how to upgrade and rollback the Apigee hybrid installation, and how to monitor and troubleshoot the Apigee hybrid runtime plane components.

Specialization Overview

The Managing Google Cloud's Apigee API Platform for Hybrid Cloud Specialization is designed to provide comprehensive training on:

Apigee Fundamentals: Understanding API design, API proxies, traffic management, and security policies.

Hybrid Cloud Deployment: Configuring Apigee in hybrid environments using Kubernetes and on-premises installations.

Security Best Practices: Implementing secure API authentication and authorization mechanisms.

API Analytics & Monitoring: Leveraging Apigee’s analytics tools to optimize API performance and troubleshoot errors.

Monetization Strategies: Setting up API subscription models, billing, and usage tracking to generate revenue from APIs.


Who Should Take This Specialization?

This specialization is ideal for:

Cloud Architects & Engineers: Professionals responsible for designing and managing cloud-based API infrastructures.

API Developers & Managers: Those involved in developing, deploying, and securing APIs.

IT Professionals working in hybrid cloud environments: Engineers looking to enhance their API management skills in a multi-cloud ecosystem.

Businesses aiming to optimize API-driven digital transformation: Organizations leveraging APIs to modernize legacy systems and integrate new digital solutions.

Career Benefits of Apigee Specialization

Upon completing this specialization, you can:

Design, implement, and manage APIs efficiently across hybrid cloud environments.

Strengthen API security by applying best practices in authentication and threat mitigation.

Gain hands-on experience in API traffic management, analytics, and performance tuning.

Monetize APIs effectively to generate revenue and optimize API usage.

Enhance cloud integration skills, opening new career opportunities in API management, cloud computing, and DevOps roles.

Join Free : Managing Google Cloud's Apigee API Platform for Hybrid Cloud Specialization

Conclusion

APIs are the backbone of modern digital applications, enabling seamless connectivity between cloud, on-premises, and third-party services. Managing APIs efficiently in hybrid cloud environments requires a robust and scalable API management platform like Google Cloud’s Apigee.

This specialization provides the expertise needed to harness Apigee’s full potential, ensuring API security, scalability, and high performance. Whether you are a cloud professional, API developer, or enterprise architect, mastering Apigee API management will enhance your career and help drive digital transformation initiatives.

Tuesday, 4 March 2025

Python Coding Challange - Question With Answer(01050325)

 


Explanation:

  1. The variable num is initialized with the value 1.
  2. The while loop checks the condition num < 5. Since 1 < 5 is True, the loop executes.
  3. Inside the loop, print(num) prints the current value of num.
  4. However, there is no statement to increment num, meaning num always remains 1.
  5. Since 1 < 5 is always True, the loop never stops and results in an infinite loop.

Output (Infinite Loop):

plaintext
1
1 1 1
...

(The loop will continue printing 1 forever.)

How to Fix It?

To ensure the loop terminates correctly, we should increment num inside the loop:


num = 1
while num < 5: print(num)
num += 1 # Increment num

Correct Output:


1
2 3
4

Now, the loop stops when num becomes 5, as 5 < 5 is False.

Tree Rings pattern using python


 import numpy as np

import matplotlib.pyplot as plt

def generate_tree_rings(num_rings=20, max_radius=10, noise_factor=0.2):

    fig, ax = plt.subplots(figsize=(6, 6))

    ax.set_xlim(-max_radius, max_radius)

    ax.set_ylim(-max_radius, max_radius)

    ax.set_aspect('equal')

    ax.axis('off')

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

        radius = (i / num_rings) * max_radius

        theta = np.linspace(0, 2 * np.pi, 500)

        r_noise = radius + noise_factor * np.sin(5 * theta) * np.random.uniform(0.5, 1.5)

        x = r_noise * np.cos(theta)

        y = r_noise * np.sin(theta)

        ax.plot(x, y, color='saddlebrown', lw=1)

    plt.title("Tree Rings Pattern", fontsize=14, fontweight='bold')

    plt.show()

generate_tree_rings()

#source code --> clcoding.com

Code Explanation:

Step 1: Importing Required Libraries

import numpy as np

import matplotlib.pyplot as plt

NumPy (np): Used for mathematical operations, especially creating a grid of points.

Matplotlib (plt): Used for visualization, specifically to create a contour plot of the ripple pattern.


Step 2: Creating a Grid of Points

x = np.linspace(-5, 5, 400)  # X-axis range

y = np.linspace(-5, 5, 400)  # Y-axis range

X, Y = np.meshgrid(x, y)  # Create a coordinate grid

np.linspace(-5, 5, 400): Creates 400 evenly spaced points between -5 and 5 for both the X and Y axes.

np.meshgrid(x, y): Converts these 1D arrays into 2D coordinate matrices, so we can compute values at every point in a 2D space.


Step 3: Defining the Ripple Effect

R = np.sqrt(X**2 + Y**2)  # Compute radial distance from the center

Z = np.sin(5 * R) / (1 + R)  # Apply a damped sine wave function

R = np.sqrt(X**2 + Y**2):


Computes the radial distance of each point from the origin (0,0).

This ensures that waves radiate outward from the center.

Z = np.sin(5 * R) / (1 + R):

sin(5 * R): Generates oscillations that form the ripple pattern.

/(1 + R): Damps the waves so they fade out as they move away from the center.


Step 4: Plotting the Ripple Effect

plt.figure(figsize=(6, 6))  # Set figure size

plt.contourf(X, Y, Z, cmap='Blues')  # Create filled contour plot

plt.colorbar(label='Wave Intensity')  # Add color legend

plt.axis('off')  # Remove axes for a clean look

plt.title("Water Ripple Pattern")  # Set title

plt.show()  # Display the plot

plt.contourf(X, Y, Z, cmap='Blues'):


Creates smooth color-filled contours based on Z values.

cmap='Blues': Uses blue shades to resemble water ripples.

plt.colorbar(label='Wave Intensity'):

Adds a color legend indicating the intensity of the waves.

plt.axis('off'):

Removes axes to give a clean water effect.

plt.show():

Displays the final ripple effect.


Radial Starburst pattern using python

 


import numpy as np

import matplotlib.pyplot as plt

def draw_starburst(n_lines=100,radius=10):

    fig,ax=plt.subplots(figsize=(6,6))

    center_x,center_y=0,0

    angles=np.linspace(0,2*np.pi,n_lines,endpoint=False)

    for angle in angles:

        x=radius*np.cos(angle)

        y=radius*np.sin(angle)

        ax.plot([center_x,x],[center_y,y],color='black',lw=1)

    ax.set_xlim(-radius,radius)

    ax.set_ylim(-radius,radius)

    ax.set_aspect('equal')

    ax.axis('off')

    plt.title('Radial Starburst pattern',fontsize=14,fontweight='bold')

    plt.show()

draw_starburst(100,10)

#source code --> clcoding.com 

Code Explanation:

1. Import Necessary Libraries

import numpy as np

import matplotlib.pyplot as plt

numpy is used to generate evenly spaced angles for the radial lines.

matplotlib.pyplot is used to create the plot and draw the lines.


2. Define the draw_starburst Function

def draw_starburst(n_lines=100, radius=10):

This function generates a radial starburst pattern.

n_lines → The number of lines forming the pattern (default: 100).

radius → The length of each radial line (default: 10).


3. Create a Figure and Axes

fig, ax = plt.subplots(figsize=(6, 6))

This initializes a matplotlib figure with a square aspect ratio.

The figsize=(6, 6) ensures the figure is a square, making the pattern symmetrical.


4. Define Center and Compute Angles

center_x, center_y = 0, 0  

angles = np.linspace(0, 2 * np.pi, n_lines, endpoint=False)

The center of the pattern is set to (0, 0).

np.linspace(0, 2 * np.pi, n_lines, endpoint=False) generates n_lines angles evenly spaced around a full circle (0 to 2π radians).


5. Draw Radial Lines

for angle in angles:

    x = radius * np.cos(angle)

    y = radius * np.sin(angle)

    ax.plot([center_x, x], [center_y, y], color='black', lw=1)

For each angle:

Compute the (x, y) coordinates using the unit circle formulas:

x=radius×cos(angle)

y=radius×sin(angle)

ax.plot([center_x, x], [center_y, y], color='black', lw=1) draws a line from the center to the calculated point.


6. Adjust Plot Aesthetics

ax.set_xlim(-radius, radius)

ax.set_ylim(-radius, radius)

ax.set_aspect('equal')

ax.axis('off')  

plt.title('Radial Starburst Pattern', fontsize=14, fontweight='bold')

plt.show()

ax.set_xlim(-radius, radius) and ax.set_ylim(-radius, radius) ensure the plot covers the entire starburst pattern.

ax.set_aspect('equal') maintains a 1:1 aspect ratio to prevent distortion.

ax.axis('off') hides axis labels and ticks for a clean visualization.

plt.title(...) sets the plot title with bold formatting.

plt.show() displays the plot.


Mosaic Tile pattern plot using python


import numpy as np

import matplotlib.pyplot as plt

rows,cols=8,8

tile_size=1

fig,ax=plt.subplots(figsize=(8,8))

ax.set_xlim(0,cols*tile_size)

ax.set_ylim(0,rows*tile_size)

ax.set_aspect('equal')

ax.axis('off')

colors=['#6FA3EF','#F4C542','#E96A64','#9C5E7F']

for row in range(rows):

    for col in range(cols):

        x=col*tile_size

        y=row*tile_size

        color=np.random.choice(colors)

        square=plt.Rectangle((x,y),tile_size,tile_size,color=color,ec='white',lw=2)

        ax.add_patch(square)

plt.title('Mosaic tile pattern plot',fontsize=16,fontweight='bold',color='navy',pad=15)

plt.show()

#source code --> clcoding.com         

Code Explanation:

 Importing Necessary Libraries

import numpy as np

import matplotlib.pyplot as plt

numpy (np) → Used for selecting random colors (np.random.choice)

matplotlib.pyplot (plt) → Used for creating and displaying the plot


Setting Grid Size and Tile Size

rows, cols = 10, 10  

tile_size = 1  

Defines a 10×10 grid (rows = 10, cols = 10)

Each tile (square) has a side length of 1 unit


Creating the Figure & Axes

fig, ax = plt.subplots(figsize=(8, 8))

Creates a figure (fig) and an axis (ax)

figsize=(8, 8) → Creates an 8×8-inch plot


Setting Axis Limits

ax.set_xlim(0, cols * tile_size)

ax.set_ylim(0, rows * tile_size)

ax.set_xlim(0, cols * tile_size) → X-axis ranges from 0 to cols * tile_size = 10 * 1 = 10

ax.set_ylim(0, rows * tile_size) → Y-axis ranges from 0 to rows * tile_size = 10 * 1 = 10

This ensures the entire grid fits within the defined space


Maintaining Square Tiles and Hiding Axes

ax.set_aspect('equal')

ax.axis('off')

ax.set_aspect('equal') → Ensures the tiles are perfect squares

ax.axis('off') → Hides the axes (grid lines, ticks, labels) for a clean look


Defining Colors for the Tiles

colors = ['#6FA3EF', '#F4C542', '#E96A64', '#9C5E7F']

A list of 4 hex color codes

Colors used:

#6FA3EF (Light Blue)

#F4C542 (Yellow)

#E96A64 (Red-Orange)

#9C5E7F (Dark Purple)

The colors are chosen randomly for each tile


Creating the Mosaic Tiles Using Nested Loops

for row in range(rows):

    for col in range(cols):

Outer loop (row) → Iterates through each row

Inner loop (col) → Iterates through each column

This ensures we fill all (10 × 10) = 100 tiles in the mosaic grid


Setting Tile Position and Assigning Random Color

x = col * tile_size  

y = row * tile_size  

color = np.random.choice(colors)  

x = col * tile_size → Calculates X-coordinate of the tile

y = row * tile_size → Calculates Y-coordinate of the tile

np.random.choice(colors) → Randomly selects a color for the tile


Drawing the Tiles

square = plt.Rectangle((x, y), tile_size, tile_size, color=color, ec='white', lw=2)

ax.add_patch(square)

plt.Rectangle((x, y), tile_size, tile_size, color=color, ec='white', lw=2)


Creates a square tile at (x, y)

Size = tile_size × tile_size (1×1)

color=color → Assigns the random color

ec='white' → Adds a white border around each tile

lw=2 → Sets the border width to 2

ax.add_patch(square) → Adds the tile to the plot


Adding a Title

plt.title("Mosaic Tile Pattern", fontsize=16, fontweight='bold', color='navy', pad=15)

Adds a title "Mosaic Tile Pattern" to the plot

Title settings:

fontsize=16 → Large text

fontweight='bold' → Bold text

color='navy' → Dark blue text

pad=15 → Adds space above the title


Displaying the Pattern

plt.show()

Displays the final mosaic tile pattern


Popular Posts

Categories

100 Python Programs for Beginner (96) AI (38) Android (24) AngularJS (1) Api (2) Assembly Language (2) aws (17) Azure (7) BI (10) book (4) Books (189) C (77) C# (12) C++ (83) Course (67) Coursera (248) Cybersecurity (25) Data Analysis (1) Data Analytics (2) data management (11) Data Science (142) Data Strucures (8) Deep Learning (21) Django (16) Downloads (3) edx (2) Engineering (14) Euron (29) Events (6) Excel (13) Factorial (1) Finance (6) flask (3) flutter (1) FPL (17) Generative AI (9) Google (36) Hadoop (3) HTML Quiz (1) HTML&CSS (47) IBM (30) IoT (1) IS (25) Java (93) Java quiz (1) Leet Code (4) Machine Learning (78) Meta (22) MICHIGAN (5) microsoft (4) Nvidia (4) Pandas (4) PHP (20) Projects (29) pyth (1) Python (1014) Python Coding Challenge (452) Python Quiz (94) Python Tips (5) Questions (2) R (70) React (6) Scripting (1) security (3) Selenium Webdriver (4) Software (17) SQL (42) UX Research (1) web application (8) Web development (4) web scraping (2)

Followers

Python Coding for Kids ( Free Demo for Everyone)