{"id":114145,"date":"2025-09-04T12:30:00","date_gmt":"2025-09-04T07:00:00","guid":{"rendered":"https:\/\/www.mygreatlearning.com\/blog\/?page_id=114145"},"modified":"2025-12-12T10:53:40","modified_gmt":"2025-12-12T05:23:40","slug":"python-exercise","status":"publish","type":"page","link":"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/","title":{"rendered":"Python Exercises"},"content":{"rendered":"\n<link href=\"https:\/\/fonts.googleapis.com\/css2?family=Inter:wght@300;400;500;600;700&display=swap\" rel=\"stylesheet\">\n<link href=\"https:\/\/fonts.googleapis.com\/css2?family=Fira+Code:wght@400;500&display=swap\" rel=\"stylesheet\">\n\n<style>\n    \/* Scoping variables to this wrapper only *\/\n    .custom-py-wrapper {\n        --py-primary-gradient: #764ba2;\n        --py-text-primary: #1a1a1a;\n        --py-text-secondary: #6b7280;\n        --py-text-tertiary: #9ca3af;\n        --py-bg-primary: #ffffff;\n        --py-bg-secondary: #f9fafb;\n        --py-bg-tertiary: #f3f4f6;\n        --py-border-subtle: #e5e7eb;\n        --py-accent-blue: #3b82f6;\n        --py-accent-purple: #8b5cf6;\n        --py-accent-green: #10b981;\n        --py-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n        --py-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);\n        --py-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);\n        --py-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);\n        \n        \/* Apply Body Styles here *\/\n        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\n        background: var(--py-bg-secondary);\n        color: var(--py-text-primary);\n        line-height: 1.6;\n        -webkit-font-smoothing: antialiased;\n        -moz-osx-font-smoothing: grayscale;\n        width: 100%;\n        display: block;\n    }\n\n    \/* Reset only inside this component *\/\n    .custom-py-wrapper * {\n        box-sizing: border-box;\n    }\n\n    \/* Remove default WordPress margins for elements inside *\/\n    .custom-py-wrapper h1, \n    .custom-py-wrapper h2, \n    .custom-py-wrapper h3, \n    .custom-py-wrapper p {\n        margin-top: 0;\n    }\n\n    .custom-py-container {\n        max-width: 1280px;\n        margin: 0 auto;\n        padding: 80px 32px;\n    }\n\n    \/* Hero Section *\/\n    .custom-py-hero {\n        text-align: center;\n        margin-bottom: 80px;\n        animation: customPyFadeInUp 0.8s ease-out;\n    }\n\n    @keyframes customPyFadeInUp {\n        from {\n            opacity: 0;\n            transform: translateY(30px);\n        }\n        to {\n            opacity: 1;\n            transform: translateY(0);\n        }\n    }\n\n    .custom-py-hero-badge {\n        display: inline-flex;\n        align-items: center;\n        gap: 8px;\n        background: var(--py-bg-primary);\n        padding: 8px 16px;\n        border-radius: 100px;\n        font-size: 13px;\n        font-weight: 500;\n        color: var(--py-accent-purple);\n        margin-bottom: 24px;\n        box-shadow: var(--py-shadow-sm);\n        border: 1px solid var(--py-border-subtle);\n    }\n\n    .custom-py-hero-title {\n        font-size: 56px;\n        font-weight: 700;\n        letter-spacing: -0.03em;\n        margin-bottom: 20px;\n        background: linear-gradient(135deg, #1a1a1a 0%, #4a5568 100%);\n        -webkit-background-clip: text;\n        -webkit-text-fill-color: transparent;\n        background-clip: text;\n        line-height: 1.1;\n    }\n\n    .custom-py-hero-description {\n        font-size: 20px;\n        color: var(--py-text-secondary);\n        max-width: 600px;\n        margin: 0 auto 40px;\n        font-weight: 400;\n        line-height: 1.6;\n    }\n\n    \/* CTA Banner *\/\n    .custom-py-cta-banner {\n        background: var(--py-primary-gradient);\n        border-radius: 24px;\n        padding: 48px;\n        color: white;\n        margin-bottom: 60px;\n        position: relative;\n        overflow: hidden;\n        box-shadow: var(--py-shadow-xl);\n        animation: customPyFadeInUp 0.8s ease-out 0.2s backwards;\n    }\n\n    .custom-py-cta-banner::before {\n        content: '';\n        position: absolute;\n        top: -50%;\n        right: -20%;\n        width: 400px;\n        height: 400px;\n        background: rgba(255, 255, 255, 0.1);\n        border-radius: 50%;\n        filter: blur(60px);\n    }\n\n    .custom-py-cta-content {\n        position: relative;\n        z-index: 1;\n        max-width: 800px;\n    }\n\n    .custom-py-cta-label {\n        font-size: 12px;\n        text-transform: uppercase;\n        letter-spacing: 1.5px;\n        font-weight: 600;\n        opacity: 0.9;\n        margin-bottom: 12px;\n        display: block;\n    }\n\n    .custom-py-cta-title {\n        color: white !important;\n    }\n\n    .custom-py-cta-description {\n        font-size: 16px;\n        opacity: 0.95;\n        margin-bottom: 28px;\n        line-height: 1.6;\n        color: white;\n    }\n\n    .custom-py-btn-primary {\n        background: white;\n        color: var(--py-accent-purple);\n        padding: 14px 32px;\n        border-radius: 12px;\n        font-weight: 600;\n        font-size: 15px;\n        border: none;\n        cursor: pointer;\n        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);\n        display: inline-flex;\n        align-items: center;\n        gap: 8px;\n        text-decoration: none;\n    }\n\n    .custom-py-btn-primary:hover {\n        transform: translateY(-2px);\n        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);\n    }\n\n    \/* Grid Layout *\/\n    .custom-py-content-grid {\n        display: grid;\n        grid-template-columns: 1fr 380px;\n        gap: 40px;\n        align-items: start;\n    }\n\n    \/* Section Header *\/\n    .custom-py-section-header {\n        margin-bottom: 32px;\n    }\n\n    .custom-py-section-title {\n        font-size: 24px;\n        font-weight: 600;\n        color: var(--py-text-primary);\n        letter-spacing: -0.01em;\n        margin-bottom: 8px;\n    }\n\n    .custom-py-section-subtitle {\n        font-size: 15px;\n        color: var(--py-text-secondary);\n    }\n\n    \/* Module Card *\/\n    .custom-py-module-card {\n        background: var(--py-bg-primary);\n        border-radius: 20px;\n        margin-bottom: 16px;\n        overflow: hidden;\n        border: 1px solid var(--py-border-subtle);\n        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n        animation: customPyFadeInUp 0.6s ease-out backwards;\n    }\n\n    .custom-py-module-card:hover {\n        box-shadow: var(--py-shadow-lg);\n        border-color: var(--py-accent-purple);\n    }\n\n    .custom-py-module-header {\n        padding: 28px 32px;\n        cursor: pointer;\n        display: flex;\n        align-items: center;\n        gap: 20px;\n        transition: background 0.2s;\n        user-select: none;\n    }\n\n    .custom-py-module-header:hover {\n        background: var(--py-bg-secondary);\n    }\n\n    .custom-py-module-number {\n        width: 48px;\n        height: 48px;\n        border-radius: 12px;\n        background: var(--py-primary-gradient);\n        color: white;\n        display: flex;\n        align-items: center;\n        justify-content: center;\n        font-weight: 700;\n        font-size: 18px;\n        flex-shrink: 0;\n    }\n\n    .custom-py-module-info {\n        flex: 1;\n    }\n\n    .custom-py-module-title {\n        font-size: 18px;\n        font-weight: 600;\n        color: var(--py-text-primary);\n        margin-bottom: 4px;\n        letter-spacing: -0.01em;\n    }\n\n    .custom-py-module-meta {\n        display: flex;\n        align-items: center;\n        gap: 16px;\n        font-size: 14px;\n        color: var(--py-text-secondary);\n    }\n\n    .custom-py-module-meta-item {\n        display: flex;\n        align-items: center;\n        gap: 6px;\n    }\n\n    .custom-py-chevron {\n        width: 24px;\n        height: 24px;\n        color: var(--py-text-tertiary);\n        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n    }\n\n    .custom-py-module-card.custom-py-expanded .custom-py-chevron {\n        transform: rotate(180deg);\n    }\n\n    .custom-py-module-body {\n        max-height: 0;\n        overflow: hidden;\n        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);\n        background: var(--py-bg-secondary);\n    }\n\n    .custom-py-module-card.custom-py-expanded .custom-py-module-body {\n        max-height: 3000px;\n    }\n\n    \/* Exercise Item as Link *\/\n    a.custom-py-exercise-item {\n        padding: 20px 32px;\n        display: flex;\n        align-items: flex-start;\n        gap: 16px;\n        border-top: 1px solid var(--py-border-subtle);\n        transition: all 0.2s;\n        cursor: pointer;\n        text-decoration: none;\n        color: inherit;\n        position: relative;\n    }\n\n    a.custom-py-exercise-item:hover {\n        background: var(--py-bg-primary);\n    }\n\n    \/* Link Icon wrapper *\/\n    .custom-py-link-icon-wrapper {\n        width: 24px;\n        height: 24px;\n        flex-shrink: 0;\n        margin-top: 2px;\n        color: var(--py-text-tertiary);\n        transition: color 0.2s;\n        display: flex;\n        align-items: center;\n        justify-content: center;\n    }\n\n    a.custom-py-exercise-item:hover .custom-py-link-icon-wrapper {\n        color: var(--py-accent-purple);\n    }\n\n    .custom-py-exercise-content {\n        flex: 1;\n        display: flex;\n        align-items: flex-start;\n        justify-content: space-between;\n        gap: 12px;\n    }\n\n    .custom-py-exercise-details {\n        display: flex;\n        flex-direction: column;\n        gap: 4px;\n    }\n\n    .custom-py-exercise-title {\n        font-size: 15px;\n        font-weight: 500;\n        color: var(--py-text-primary);\n        transition: color 0.2s;\n    }\n\n    .custom-py-exercise-desc {\n        font-size: 13px;\n        color: var(--py-text-secondary);\n        line-height: 1.5;\n    }\n\n    a.custom-py-exercise-item:hover .custom-py-exercise-title {\n        color: var(--py-accent-purple);\n    }\n\n    .custom-py-difficulty-badge {\n        padding: 4px 10px;\n        border-radius: 6px;\n        font-size: 11px;\n        font-weight: 600;\n        text-transform: uppercase;\n        letter-spacing: 0.5px;\n        white-space: nowrap;\n        margin-top: 2px;\n    }\n\n    .custom-py-difficulty-badge.custom-py-easy {\n        background: #d1fae5;\n        color: #065f46;\n    }\n\n    .custom-py-difficulty-badge.custom-py-medium {\n        background: #fef3c7;\n        color: #92400e;\n    }\n\n    .custom-py-difficulty-badge.custom-py-hard {\n        background: #fee2e2;\n        color: #991b1b;\n    }\n\n    \/* Sidebar *\/\n    .custom-py-sidebar {\n        position: sticky;\n        top: 32px;\n    }\n\n    \/* ----------------------------------------------------- *\/\n    \/* UPDATED: SIDEBAR CARDS (Gradient Theme) *\/\n    \/* ----------------------------------------------------- *\/\n    \n    .custom-py-dark-card {\n        background: var(--py-primary-gradient); \/* CHANGED TO GRADIENT *\/\n        color: white;\n        border: none;\n        border-radius: 20px;\n        padding: 24px;\n        margin-bottom: 20px;\n        box-shadow: var(--py-shadow-xl);\n        transition: transform 0.3s ease, box-shadow 0.3s ease;\n        position: relative;\n        overflow: hidden;\n    }\n\n    .custom-py-dark-card:hover {\n        transform: translateY(-2px);\n        box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.2);\n    }\n\n    .custom-py-card-header {\n        display: flex;\n        align-items: center;\n        gap: 12px;\n        margin-bottom: 16px;\n        position: relative;\n        z-index: 2;\n    }\n\n    .custom-py-card-icon {\n        width: 36px;\n        height: 36px;\n        background: rgba(255,255,255,0.15); \/* Slightly lighter glass *\/\n        border-radius: 10px;\n        display: flex;\n        align-items: center;\n        justify-content: center;\n        color: white; \/* Icons white to stand out *\/\n    }\n\n    \/* Icon Accent Colors (No longer needed on gradient, kept white) *\/\n    .icon-quiz-color { color: white; } \n    .icon-course-color { color: white; }\n    .icon-compiler-color { color: white; }\n\n    .custom-py-card-title {\n        font-size: 18px !important;\n        color: white !important;\n        margin: 0 !important;\n        font-weight: 600;\n        line-height: 1.2;\n    }\n\n    .custom-py-card-desc {\n        font-size: 14px;\n        color: white !important; \/* Brighter for contrast *\/\n        margin-bottom: 20px !important;\n        line-height: 1.5;\n        position: relative;\n        z-index: 2;\n    }\n\n    \/* Mini Editor specific styles *\/\n    .custom-py-mini-editor {\n        background: rgba(0, 0, 0, 0.3); \/* Transparent dark for blending *\/\n        border-radius: 8px;\n        padding: 14px;\n        border: 1px solid rgba(255,255,255,0.1);\n        margin-bottom: 20px;\n        font-family: 'Fira Code', monospace;\n        font-size: 13px;\n        position: relative;\n        z-index: 2;\n    }\n\n    .custom-py-code-line { display: block; line-height: 1.6; }\n    .custom-py-token-kwd { font-weight: bold; }\n    .custom-py-token-str { color: #facc15; }\n    .custom-py-token-func { color: #60a5fa; }\n    .custom-py-token-comment { color: #94a3b8; font-style: italic; }\n\n    \/* Course Meta Data *\/\n    .custom-py-course-meta {\n        display: flex;\n        align-items: center;\n        gap: 12px;\n        margin-bottom: 16px;\n        font-size: 13px;\n        color: rgba(255,255,255,0.8);\n    }\n    .custom-py-rating-stars { color: #fbbf24; }\n\n    \/* Universal Dark Button - Now White to Match Gradient Theme *\/\n    .custom-py-dark-btn {\n        width: 100%;\n        border: none;\n        padding: 12px;\n        border-radius: 10px;\n        font-weight: 600;\n        font-size: 14px;\n        cursor: pointer;\n        transition: all 0.2s;\n        display: flex;\n        align-items: center;\n        justify-content: center;\n        gap: 8px;\n        text-decoration: none;\n        position: relative;\n        z-index: 2;\n    }\n\n    \/* Button Variants - White Background with Accent Text *\/\n    .btn-quiz { background: white; color: #7c3aed; }\n    .btn-quiz:hover { background: #f3f4f6; }\n\n    .btn-course { background: white; color: #3b82f6; }\n    .btn-course:hover { background: #f3f4f6; }\n\n    .btn-compiler { background: white; color: #7c3aed; }\n    .btn-compiler:hover { background: #f3f4f6; }\n\n\n    @media (max-width: 1024px) {\n        .custom-py-content-grid {\n            grid-template-columns: 1fr;\n        }\n        \n        .custom-py-hero-title {\n            font-size: 42px;\n        }\n        \n        .custom-py-cta-banner {\n            padding: 32px;\n        }\n        \n        .custom-py-cta-title {\n            font-size: 24px;\n        }\n    }\n\n    @media (max-width: 640px) {\n        .custom-py-container {\n            padding: 40px 20px;\n        }\n        \n        .custom-py-hero-title {\n            font-size: 32px;\n        }\n        \n        .custom-py-hero-description {\n            font-size: 16px;\n        }\n        \n        .custom-py-module-header {\n            padding: 20px;\n        }\n        \n        a.custom-py-exercise-item {\n            padding: 16px 20px;\n        }\n    }\n<\/style>\n\n<div class=\"custom-py-wrapper\">\n    <div class=\"custom-py-container\">\n        <div class=\"custom-py-hero\">\n            <div class=\"custom-py-hero-badge\">\n                <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                    <path d=\"M13 2L3 14h9l-1 8 10-12h-9l1-8z\"\/>\n                <\/svg>\n                Interactive Learning\n            <\/div>\n            <h1 class=\"custom-py-hero-title\" class=\"custom-py-hero-title\" id=\"python-practice-exercises\">Python Practice Exercises<\/h1>\n            <p class=\"custom-py-hero-description\">\n                Master Python through hands-on practice. 30+ carefully crafted challenges designed to sharpen your coding skills.\n            <\/p>\n        <\/div>\n\n<div class=\"custom-py-cta-banner\">\n    <div class=\"custom-py-cta-content\">\n        <span class=\"custom-py-cta-label\">\u2728 Recommended For Beginners<\/span>\n        <h2 class=\"custom-py-cta-title\" class=\"custom-py-cta-title\" id=\"build-a-strong-foundation-first\">Build a Strong Foundation First<\/h2>\n        <p class=\"custom-py-cta-description\">\n            New to Python? Our comprehensive course takes you from zero to hero with hands-on projects and industry-recognized certificate.\n        <\/p>\n        <a href=\"https:\/\/www.mygreatlearning.com\/academy\/premium\/master-python-programming?utm_source=blog\" class=\"custom-py-btn-primary\">\n            Explore Python Course\n            <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                <path d=\"M5 12h14M12 5l7 7-7 7\"\/>\n            <\/svg>\n        <\/a>\n    <\/div>\n<\/div>\n\n\n        <div class=\"custom-py-content-grid\">\n            <main>\n                <div class=\"custom-py-section-header\">\n                    <h2 class=\"custom-py-section-title\" class=\"custom-py-section-title\" id=\"exercise-modules\">Exercise Modules<\/h2>\n                    <p class=\"custom-py-section-subtitle\">Progress through structured challenges at your own pace<\/p>\n                <\/div>\n\n                <div class=\"custom-py-module-card custom-py-expanded\" id=\"custom-py-module1\">\n                    <div class=\"custom-py-module-header\" onclick=\"customPyToggleModule('custom-py-module1')\">\n                        <div class=\"custom-py-module-number\">1<\/div>\n                        <div class=\"custom-py-module-info\">\n                            <div class=\"custom-py-module-title\">Variables, Input\/Output, and Basic Math<\/div>\n                            <div class=\"custom-py-module-meta\">\n                                <span class=\"custom-py-module-meta-item\">Syntax & Logic<\/span>\n                            <\/div>\n                        <\/div>\n                        <svg class=\"custom-py-chevron\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                            <path d=\"M6 9l6 6 6-6\"\/>\n                        <\/svg>\n                    <\/div>\n                    <div class=\"custom-py-module-body\">\n                        <a href=\"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/python-exercise-receipt-program\/\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">1.1 The Receipt<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Calculate subtotal, tax, and formatted receipt from user input.<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-easy\">Easy<\/span>\n                            <\/div>\n                        <\/a>\n                        <a href=\"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/python-exercise-calculate-age\/\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">1.2 Age Calculator<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Calculate age from birth year. Bonus: Handle birthdays not yet occurred.<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-easy\">Easy<\/span>\n                            <\/div>\n                        <\/a>\n                        <a href=\"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/python-exercise-currency-converter\/\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">1.3 Currency Converter<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Convert US Dollars to local currency using a fixed exchange rate.<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-easy\">Easy<\/span>\n                            <\/div>\n                        <\/a>\n                    <\/div>\n                <\/div>\n\n                <div class=\"custom-py-module-card\" id=\"custom-py-module2\">\n                    <div class=\"custom-py-module-header\" onclick=\"customPyToggleModule('custom-py-module2')\">\n                        <div class=\"custom-py-module-number\">2<\/div>\n                        <div class=\"custom-py-module-info\">\n                            <div class=\"custom-py-module-title\">Control Flow (If\/Else Conditionals)<\/div>\n                            <div class=\"custom-py-module-meta\">\n                                <span class=\"custom-py-module-meta-item\">Logic & Branching<\/span>\n                            <\/div>\n                        <\/div>\n                        <svg class=\"custom-py-chevron\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                            <path d=\"M6 9l6 6 6-6\"\/>\n                        <\/svg>\n                    <\/div>\n                    <div class=\"custom-py-module-body\">\n                        <a href=\"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/python-exercise-even-odd\/\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">2.1 Even or Odd<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Take an integer input and print whether it is even or odd.<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-easy\">Easy<\/span>\n                            <\/div>\n                        <\/a>\n                        <a href=\"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/python-exercise-grade-calculator\/\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">2.2 Grade Calculator<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Print letter grade (A-F) based on score. Handle invalid inputs.<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-medium\">Medium<\/span>\n                            <\/div>\n                        <\/a>\n                        <a href=\"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/python-exercise-leap-year-program\/\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">2.3 Leap Year Logic<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Determine if a year is a leap year using full 100\/400 year rules.<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-medium\">Medium<\/span>\n                            <\/div>\n                        <\/a>\n                    <\/div>\n                <\/div>\n\n                <div class=\"custom-py-module-card\" id=\"custom-py-module3\">\n                    <div class=\"custom-py-module-header\" onclick=\"customPyToggleModule('custom-py-module3')\">\n                        <div class=\"custom-py-module-number\">3<\/div>\n                        <div class=\"custom-py-module-info\">\n                            <div class=\"custom-py-module-title\">Looping (For & While)<\/div>\n                            <div class=\"custom-py-module-meta\">\n                                <span class=\"custom-py-module-meta-item\">Iteration<\/span>\n                            <\/div>\n                        <\/div>\n                        <svg class=\"custom-py-chevron\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                            <path d=\"M6 9l6 6 6-6\"\/>\n                        <\/svg>\n                    <\/div>\n                    <div class=\"custom-py-module-body\">\n                        <a href=\"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/python-exercise-multiplication-table\/\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">3.1 Multiplication Table<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Print multiplication table for a user-provided number (1-10).<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-easy\">Easy<\/span>\n                            <\/div>\n                        <\/a>\n                        <a href=\"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/python-exercise-sum-numbers\/\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">3.2 The Summation<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Write a loop that sums all numbers from 1 to 100.<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-easy\">Easy<\/span>\n                            <\/div>\n                        <\/a>\n                        <a href=\"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/python-exercise-password-retry-system\/\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">3.3 Password Retry<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Loop asking for password. Lock out after 3 wrong attempts.<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-medium\">Medium<\/span>\n                            <\/div>\n                        <\/a>\n                        <a href=\"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/pyramid-pattern-printing-program\/\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">3.4 Pattern Printing<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Use nested loops to print a right-angled triangle of stars.<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-hard\">Hard<\/span>\n                            <\/div>\n                        <\/a>\n                    <\/div>\n                <\/div>\n\n                <div class=\"custom-py-module-card\" id=\"custom-py-module4\">\n                    <div class=\"custom-py-module-header\" onclick=\"customPyToggleModule('custom-py-module4')\">\n                        <div class=\"custom-py-module-number\">4<\/div>\n                        <div class=\"custom-py-module-info\">\n                            <div class=\"custom-py-module-title\">Lists & Tuples<\/div>\n                            <div class=\"custom-py-module-meta\">\n                                <span class=\"custom-py-module-meta-item\">Data Structures<\/span>\n                            <\/div>\n                        <\/div>\n                        <svg class=\"custom-py-chevron\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                            <path d=\"M6 9l6 6 6-6\"\/>\n                        <\/svg>\n                    <\/div>\n                    <div class=\"custom-py-module-body\">\n                        <a href=\"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/min-max-finder-program-using-list\/\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">4.1 Min\/Max Finder<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Find largest\/smallest in list of 10 randoms without built-in functions.<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-medium\">Medium<\/span>\n                            <\/div>\n                        <\/a>\n                        <a href=\"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/remove-duplicates-from-a-list\/\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">4.2 Duplicate Remover<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Take a list with duplicates and create a new list with unique elements.<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-medium\">Medium<\/span>\n                            <\/div>\n                        <\/a>\n                        <a href=\"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/python-program-rotate-list-k-steps\/\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">4.3 List Rotation<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Write a program that rotates a list to the right by k steps.<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-hard\">Hard<\/span>\n                            <\/div>\n                        <\/a>\n                    <\/div>\n                <\/div>\n\n                <div class=\"custom-py-module-card\" id=\"custom-py-module5\">\n                    <div class=\"custom-py-module-header\" onclick=\"customPyToggleModule('custom-py-module5')\">\n                        <div class=\"custom-py-module-number\">5<\/div>\n                        <div class=\"custom-py-module-info\">\n                            <div class=\"custom-py-module-title\">Dictionaries & Sets<\/div>\n                            <div class=\"custom-py-module-meta\">\n                                <span class=\"custom-py-module-meta-item\">Key-Value & Sets<\/span>\n                            <\/div>\n                        <\/div>\n                        <svg class=\"custom-py-chevron\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                            <path d=\"M6 9l6 6 6-6\"\/>\n                        <\/svg>\n                    <\/div>\n                    <div class=\"custom-py-module-body\">\n                        <a href=\"#\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">5.1 Character Counter<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Use a dictionary to count how many times each character appears in a string.<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-medium\">Medium<\/span>\n                            <\/div>\n                        <\/a>\n                        <a href=\"#\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">5.2 Phonebook<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Create a dictionary-based phonebook with Add, Search, Delete menu.<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-hard\">Hard<\/span>\n                            <\/div>\n                        <\/a>\n                        <a href=\"#\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">5.3 Common Students<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Find intersection and symmetric difference between two sets of names.<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-medium\">Medium<\/span>\n                            <\/div>\n                        <\/a>\n                    <\/div>\n                <\/div>\n\n                <div class=\"custom-py-module-card\" id=\"custom-py-module6\">\n                    <div class=\"custom-py-module-header\" onclick=\"customPyToggleModule('custom-py-module6')\">\n                        <div class=\"custom-py-module-number\">6<\/div>\n                        <div class=\"custom-py-module-info\">\n                            <div class=\"custom-py-module-title\">Functions<\/div>\n                            <div class=\"custom-py-module-meta\">\n                                <span class=\"custom-py-module-meta-item\">Modular Programming<\/span>\n                            <\/div>\n                        <\/div>\n                        <svg class=\"custom-py-chevron\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                            <path d=\"M6 9l6 6 6-6\"\/>\n                        <\/svg>\n                    <\/div>\n                    <div class=\"custom-py-module-body\">\n                        <a href=\"#\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">6.1 Palindrome Checker<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Write a function that checks if text reads the same backward and forward.<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-medium\">Medium<\/span>\n                            <\/div>\n                        <\/a>\n                        <a href=\"#\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">6.2 Prime Number Generator<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Write a function that returns a list of all prime numbers up to n.<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-medium\">Medium<\/span>\n                            <\/div>\n                        <\/a>\n                        <a href=\"#\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">6.3 Recursive Factorial<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Calculate factorial using recursion (function calling itself).<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-hard\">Hard<\/span>\n                            <\/div>\n                        <\/a>\n                    <\/div>\n                <\/div>\n\n                <div class=\"custom-py-module-card\" id=\"custom-py-module7\">\n                    <div class=\"custom-py-module-header\" onclick=\"customPyToggleModule('custom-py-module7')\">\n                        <div class=\"custom-py-module-number\">7<\/div>\n                        <div class=\"custom-py-module-info\">\n                            <div class=\"custom-py-module-title\">File Handling & Error Handling<\/div>\n                            <div class=\"custom-py-module-meta\">\n                                <span class=\"custom-py-module-meta-item\">IO & Exceptions<\/span>\n                            <\/div>\n                        <\/div>\n                        <svg class=\"custom-py-chevron\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                            <path d=\"M6 9l6 6 6-6\"\/>\n                        <\/svg>\n                    <\/div>\n                    <div class=\"custom-py-module-body\">\n                        <a href=\"#\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">7.1 Safe Divider<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Divide numbers using try\/except to handle ZeroDivision and Value errors.<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-easy\">Easy<\/span>\n                            <\/div>\n                        <\/a>\n                        <a href=\"#\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">7.2 Log Reader<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Read 'server.log' and count how many lines contain the word \"ERROR\".<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-medium\">Medium<\/span>\n                            <\/div>\n                        <\/a>\n                        <a href=\"#\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">7.3 File Copy Utility<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Copy content from source to destination, converting text to uppercase.<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-medium\">Medium<\/span>\n                            <\/div>\n                        <\/a>\n                    <\/div>\n                <\/div>\n\n                <div class=\"custom-py-module-card\" id=\"custom-py-module8\">\n                    <div class=\"custom-py-module-header\" onclick=\"customPyToggleModule('custom-py-module8')\">\n                        <div class=\"custom-py-module-number\">8<\/div>\n                        <div class=\"custom-py-module-info\">\n                            <div class=\"custom-py-module-title\">Classes & Objects<\/div>\n                            <div class=\"custom-py-module-meta\">\n                                <span class=\"custom-py-module-meta-item\">OOP Basics<\/span>\n                            <\/div>\n                        <\/div>\n                        <svg class=\"custom-py-chevron\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                            <path d=\"M6 9l6 6 6-6\"\/>\n                        <\/svg>\n                    <\/div>\n                    <div class=\"custom-py-module-body\">\n                        <a href=\"#\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">8.1 The Circle Class<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Create a class with area() and circumference() methods.<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-easy\">Easy<\/span>\n                            <\/div>\n                        <\/a>\n                        <a href=\"#\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">8.2 Bank Account System<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Create class with deposit\/withdraw logic and balance checks.<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-medium\">Medium<\/span>\n                            <\/div>\n                        <\/a>\n                    <\/div>\n                <\/div>\n\n                <div class=\"custom-py-module-card\" id=\"custom-py-module9\">\n                    <div class=\"custom-py-module-header\" onclick=\"customPyToggleModule('custom-py-module9')\">\n                        <div class=\"custom-py-module-number\">9<\/div>\n                        <div class=\"custom-py-module-info\">\n                            <div class=\"custom-py-module-title\">Inheritance & Polymorphism<\/div>\n                            <div class=\"custom-py-module-meta\">\n                                <span class=\"custom-py-module-meta-item\">Advanced OOP<\/span>\n                            <\/div>\n                        <\/div>\n                        <svg class=\"custom-py-chevron\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                            <path d=\"M6 9l6 6 6-6\"\/>\n                        <\/svg>\n                    <\/div>\n                    <div class=\"custom-py-module-body\">\n                        <a href=\"#\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">9.1 Employee System<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Subclass Manager from Employee. Override calculate_pay to add bonus.<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-medium\">Medium<\/span>\n                            <\/div>\n                        <\/a>\n                        <a href=\"#\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">9.2 Library Management<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Classes for Book, Member, Library. Track borrowing and availability.<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-hard\">Hard<\/span>\n                            <\/div>\n                        <\/a>\n                    <\/div>\n                <\/div>\n\n                <div class=\"custom-py-module-card\" id=\"custom-py-module10\">\n                    <div class=\"custom-py-module-header\" onclick=\"customPyToggleModule('custom-py-module10')\">\n                        <div class=\"custom-py-module-number\">10<\/div>\n                        <div class=\"custom-py-module-info\">\n                            <div class=\"custom-py-module-title\">Advanced Functional Features<\/div>\n                            <div class=\"custom-py-module-meta\">\n                                <span class=\"custom-py-module-meta-item\">Pythonic Features<\/span>\n                            <\/div>\n                        <\/div>\n                        <svg class=\"custom-py-chevron\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                            <path d=\"M6 9l6 6 6-6\"\/>\n                        <\/svg>\n                    <\/div>\n                    <div class=\"custom-py-module-body\">\n                        <a href=\"#\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">10.1 List Comprehensions<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Convert list of Celsius temps to Fahrenheit in one line.<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-medium\">Medium<\/span>\n                            <\/div>\n                        <\/a>\n                        <a href=\"#\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">10.2 Lambda Sorting<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Sort a list of product tuples by price using a lambda function.<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-medium\">Medium<\/span>\n                            <\/div>\n                        <\/a>\n                        <a href=\"#\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">10.3 Decorators<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Write a @timer decorator to measure execution time of functions.<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-hard\">Hard<\/span>\n                            <\/div>\n                        <\/a>\n                    <\/div>\n                <\/div>\n\n                <div class=\"custom-py-module-card\" id=\"custom-py-module11\">\n                    <div class=\"custom-py-module-header\" onclick=\"customPyToggleModule('custom-py-module11')\">\n                        <div class=\"custom-py-module-number\">11<\/div>\n                        <div class=\"custom-py-module-info\">\n                            <div class=\"custom-py-module-title\">Iterators & Generators<\/div>\n                            <div class=\"custom-py-module-meta\">\n                                <span class=\"custom-py-module-meta-item\">Advanced Flow<\/span>\n                            <\/div>\n                        <\/div>\n                        <svg class=\"custom-py-chevron\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                            <path d=\"M6 9l6 6 6-6\"\/>\n                        <\/svg>\n                    <\/div>\n                    <div class=\"custom-py-module-body\">\n                        <a href=\"#\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">11.1 Custom Range<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Create generator my_range(start, end, step) mimicking built-in range().<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-hard\">Hard<\/span>\n                            <\/div>\n                        <\/a>\n                        <a href=\"#\" class=\"custom-py-exercise-item\" target=\"_blank\" rel=\"noopener\">\n                            <div class=\"custom-py-link-icon-wrapper\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                    <path d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" \/>\n                                <\/svg>\n                            <\/div>\n                            <div class=\"custom-py-exercise-content\">\n                                <div class=\"custom-py-exercise-details\">\n                                    <span class=\"custom-py-exercise-title\">11.2 Fibonacci Generator<\/span>\n                                    <span class=\"custom-py-exercise-desc\">Generator yielding infinite Fibonacci numbers. Print first 20.<\/span>\n                                <\/div>\n                                <span class=\"custom-py-difficulty-badge custom-py-medium\">Medium<\/span>\n                            <\/div>\n                        <\/a>\n                    <\/div>\n                <\/div>\n\n            <\/main>\n\n            <aside class=\"custom-py-sidebar\">\n                \n                <div class=\"custom-py-dark-card\">\n                    <div class=\"custom-py-card-header\">\n                        <div class=\"custom-py-card-icon icon-quiz-color\">\n                            <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                                <path d=\"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3M3.343 19.071l.707-.707M16 12a4 4 0 11-8 0 4 4 0 018 0z\" \/>\n                            <\/svg>\n                        <\/div>\n                        <h3 class=\"custom-py-card-title\" class=\"custom-py-card-title\" id=\"test-knowledge\">Test Knowledge<\/h3>\n                    <\/div>\n                    <p class=\"custom-py-card-desc\">\n                        Validate your Python skills. Take our comprehensive Python quiz.\n                    <\/p>\n                    <a href=\"https:\/\/www.mygreatlearning.com\/blog\/python-quiz\/\" class=\"custom-py-dark-btn btn-quiz\">\n                        Start Quiz\n                        <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                            <path d=\"M5 12h14M12 5l7 7-7 7\"\/>\n                        <\/svg>\n                    <\/a>\n                <\/div>\n\n                <div class=\"custom-py-dark-card\">\n                    <div class=\"custom-py-card-header\">\n                        <div class=\"custom-py-card-icon icon-compiler-color\">\n                            <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\">\n                                <path d=\"M16 18L22 12L16 6\"\/>\n                                <path d=\"M8 6L2 12L8 18\"\/>\n                            <\/svg>\n                        <\/div>\n                        <h3 class=\"custom-py-card-title\" class=\"custom-py-card-title\" id=\"online-python-compiler\">Online Python Compiler<\/h3>\n                    <\/div>\n                    \n                    <div class=\"custom-py-mini-editor\">\n                        <span class=\"custom-py-code-line\"><span class=\"custom-py-token-kwd\">def<\/span> <span class=\"custom-py-token-func\">greet<\/span>(name):<\/span>\n                        <span class=\"custom-py-code-line\">&nbsp;&nbsp;<span class=\"custom-py-token-kwd\">return<\/span> <span class=\"custom-py-token-str\">f\"Hi {name}!\"<\/span><\/span>\n                        <span class=\"custom-py-code-line\"><\/span>\n                        <span class=\"custom-py-code-line\"><span class=\"custom-py-token-comment\"># Run code instantly<\/span><\/span>\n                        <span class=\"custom-py-code-line\"><span class=\"custom-py-token-func\">print<\/span>(<span class=\"custom-py-token-func\">greet<\/span>(<span class=\"custom-py-token-str\">\"User\"<\/span>))<\/span>\n                    <\/div>\n\n                    <p class=\"custom-py-card-desc\">\n                        Run Python directly in your browser. No installation required.\n                    <\/p>\n                    <a href=\"https:\/\/www.mygreatlearning.com\/blog\/python-compiler-tool\/\" class=\"custom-py-dark-btn btn-compiler\">\n                        Start Coding\n                        <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n                            <path d=\"M5 12h14M12 5l7 7-7 7\"\/>\n                        <\/svg>\n                    <\/a>\n                <\/div>\n\n            <\/aside>\n        <\/div>\n    <\/div>\n<\/div>\n\n<script>\n    function customPyToggleModule(id) {\n        const module = document.getElementById(id);\n        module.classList.toggle('custom-py-expanded');\n    }\n<\/script>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<p>Also Check:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.mygreatlearning.com\/blog\/python-compiler-tool\/\">Online Python Compiler<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.mygreatlearning.com\/blog\/python-quiz\/\">Python Quiz and MCQs<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.mygreatlearning.com\/blog\/python-interview-questions\/\">Python Interview Questions and Answers<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.mygreatlearning.com\/blog\/top-python-projects-for-beginners\/\">Python Project Ideas for Beginners<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.mygreatlearning.com\/blog\/python-tutorial-for-beginners-a-complete-guide\/\">Python Tutorial - Learn Python<\/a><\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Interactive Learning Python Practice Exercises Master Python through hands-on practice. 30+ carefully crafted challenges designed to sharpen your coding skills. \u2728 Recommended For Beginners Build a Strong Foundation First New to Python? Our comprehensive course takes you from zero to hero with hands-on projects and industry-recognized certificate. Explore Python Course Exercise Modules Progress through structured [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":114350,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"full-width-container","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[25860],"tags":[36796,36895],"class_list":["post-114145","page","type-page","status-publish","has-post-thumbnail","hentry","category-software","tag-python","tag-python-exercise"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Python Coding Practice Questions and Exercises<\/title>\n<meta name=\"description\" content=\"Explore Python coding questions, practice problems, and mini programs to strengthen your skills. Perfect for beginners looking for hands-on Python practice.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Exercises\" \/>\n<meta property=\"og:description\" content=\"Explore Python coding questions, practice problems, and mini programs to strengthen your skills. Perfect for beginners looking for hands-on Python practice.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/\" \/>\n<meta property=\"og:site_name\" content=\"Great Learning Blog: Free Resources what Matters to shape your Career!\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GreatLearningOfficial\/\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/12\/python-coding-practice.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1408\" \/>\n\t<meta property=\"og:image:height\" content=\"768\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@Great_Learning\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/python-exercise\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/python-exercise\\\/\"},\"author\":{\"name\":\"Great Learning Editorial Team\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\"},\"headline\":\"Python Exercises\",\"datePublished\":\"2025-09-04T07:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/python-exercise\\\/\"},\"wordCount\":599,\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/python-exercise\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/12\\\/python-coding-practice.webp\",\"keywords\":[\"python\",\"python-exercise\"],\"articleSection\":[\"IT\\\/Software Development\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/python-exercise\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/python-exercise\\\/\",\"name\":\"Python Coding Practice Questions and Exercises\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/python-exercise\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/python-exercise\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/12\\\/python-coding-practice.webp\",\"datePublished\":\"2025-09-04T07:00:00+00:00\",\"description\":\"Explore Python coding questions, practice problems, and mini programs to strengthen your skills. Perfect for beginners looking for hands-on Python practice.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/python-exercise\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/python-exercise\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/python-exercise\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/12\\\/python-coding-practice.webp\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/12\\\/python-coding-practice.webp\",\"width\":1408,\"height\":768,\"caption\":\"Python Coding Problems\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/python-exercise\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python Exercises\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"name\":\"Great Learning Blog\",\"description\":\"Learn, Upskill &amp; Career Development Guide and Resources\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"alternateName\":\"Great Learning\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\",\"name\":\"Great Learning\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"width\":900,\"height\":900,\"caption\":\"Great Learning\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/GreatLearningOfficial\\\/\",\"https:\\\/\\\/x.com\\\/Great_Learning\",\"https:\\\/\\\/www.instagram.com\\\/greatlearningofficial\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/in.pinterest.com\\\/greatlearning12\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/beaconelearning\\\/\"],\"description\":\"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.\",\"email\":\"info@mygreatlearning.com\",\"legalName\":\"Great Learning Education Services Pvt. Ltd\",\"foundingDate\":\"2013-11-29\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"1001\",\"maxValue\":\"5000\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\",\"name\":\"Great Learning Editorial Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"caption\":\"Great Learning Editorial Team\"},\"description\":\"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.\",\"sameAs\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/\",\"https:\\\/\\\/in.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/Great_Learning\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCObs0kLIrDjX2LLSybqNaEA\"],\"award\":[\"Best EdTech Company of the Year 2024\",\"Education Economictimes Outstanding Education\\\/Edtech Solution Provider of the Year 2024\",\"Leading E-learning Platform 2024\"],\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/author\\\/greatlearning\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Python Coding Practice Questions and Exercises","description":"Explore Python coding questions, practice problems, and mini programs to strengthen your skills. Perfect for beginners looking for hands-on Python practice.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/","og_locale":"en_US","og_type":"article","og_title":"Python Exercises","og_description":"Explore Python coding questions, practice problems, and mini programs to strengthen your skills. Perfect for beginners looking for hands-on Python practice.","og_url":"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/","og_site_name":"Great Learning Blog: Free Resources what Matters to shape your Career!","article_publisher":"https:\/\/www.facebook.com\/GreatLearningOfficial\/","og_image":[{"width":1408,"height":768,"url":"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/12\/python-coding-practice.webp","type":"image\/webp"}],"twitter_card":"summary_large_image","twitter_site":"@Great_Learning","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/#article","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/"},"author":{"name":"Great Learning Editorial Team","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad"},"headline":"Python Exercises","datePublished":"2025-09-04T07:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/"},"wordCount":599,"publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/12\/python-coding-practice.webp","keywords":["python","python-exercise"],"articleSection":["IT\/Software Development"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/","url":"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/","name":"Python Coding Practice Questions and Exercises","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/#primaryimage"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/12\/python-coding-practice.webp","datePublished":"2025-09-04T07:00:00+00:00","description":"Explore Python coding questions, practice problems, and mini programs to strengthen your skills. Perfect for beginners looking for hands-on Python practice.","breadcrumb":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/#primaryimage","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/12\/python-coding-practice.webp","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/12\/python-coding-practice.webp","width":1408,"height":768,"caption":"Python Coding Problems"},{"@type":"BreadcrumbList","@id":"https:\/\/www.mygreatlearning.com\/blog\/python-exercise\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/www.mygreatlearning.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Python Exercises"}]},{"@type":"WebSite","@id":"https:\/\/www.mygreatlearning.com\/blog\/#website","url":"https:\/\/www.mygreatlearning.com\/blog\/","name":"Great Learning Blog","description":"Learn, Upskill &amp; Career Development Guide and Resources","publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"alternateName":"Great Learning","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mygreatlearning.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization","name":"Great Learning","url":"https:\/\/www.mygreatlearning.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","width":900,"height":900,"caption":"Great Learning"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/GreatLearningOfficial\/","https:\/\/x.com\/Great_Learning","https:\/\/www.instagram.com\/greatlearningofficial\/","https:\/\/www.linkedin.com\/school\/great-learning\/","https:\/\/in.pinterest.com\/greatlearning12\/","https:\/\/www.youtube.com\/user\/beaconelearning\/"],"description":"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.","email":"info@mygreatlearning.com","legalName":"Great Learning Education Services Pvt. Ltd","foundingDate":"2013-11-29","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"1001","maxValue":"5000"}},{"@type":"Person","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad","name":"Great Learning Editorial Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","caption":"Great Learning Editorial Team"},"description":"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.","sameAs":["https:\/\/www.mygreatlearning.com\/","https:\/\/in.linkedin.com\/school\/great-learning\/","https:\/\/x.com\/https:\/\/twitter.com\/Great_Learning","https:\/\/www.youtube.com\/channel\/UCObs0kLIrDjX2LLSybqNaEA"],"award":["Best EdTech Company of the Year 2024","Education Economictimes Outstanding Education\/Edtech Solution Provider of the Year 2024","Leading E-learning Platform 2024"],"url":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"}]}},"uagb_featured_image_src":{"full":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/12\/python-coding-practice.webp",1408,768,false],"thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/12\/python-coding-practice-150x150.webp",150,150,true],"medium":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/12\/python-coding-practice-300x164.webp",300,164,true],"medium_large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/12\/python-coding-practice-768x419.webp",768,419,true],"large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/12\/python-coding-practice-1024x559.webp",1024,559,true],"1536x1536":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/12\/python-coding-practice.webp",1408,768,false],"2048x2048":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/12\/python-coding-practice.webp",1408,768,false],"web-stories-poster-portrait":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/12\/python-coding-practice-640x768.webp",640,768,true],"web-stories-publisher-logo":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/12\/python-coding-practice-96x96.webp",96,96,true],"web-stories-thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/12\/python-coding-practice-150x82.webp",150,82,true]},"uagb_author_info":{"display_name":"Great Learning Editorial Team","author_link":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"},"uagb_comment_info":0,"uagb_excerpt":"Interactive Learning Python Practice Exercises Master Python through hands-on practice. 30+ carefully crafted challenges designed to sharpen your coding skills. \u2728 Recommended For Beginners Build a Strong Foundation First New to Python? Our comprehensive course takes you from zero to hero with hands-on projects and industry-recognized certificate. Explore Python Course Exercise Modules Progress through structured&hellip;","_links":{"self":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/pages\/114145","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/comments?post=114145"}],"version-history":[{"count":69,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/pages\/114145\/revisions"}],"predecessor-version":[{"id":114328,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/pages\/114145\/revisions\/114328"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media\/114350"}],"wp:attachment":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media?parent=114145"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/categories?post=114145"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/tags?post=114145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}