Bir ishlatib ko'ringlarchi.
from pptx import Presentation
from pptx.util import Inches, Pt
# Create a presentation object
prs = Presentation()
# Define slides content
slides_content = [
{"title": "Introduction to Python", "content": "The Versatile Programming Language\nYour Name or Center’s Name"},
{"title": "What is Python?",
"content": "• Python is a high-level, interpreted programming language.\n• Known for its simplicity and readability.\n• Created by Guido van Rossum and first released in 1991."},
{"title": "Key Features of Python",
"content": "• Easy to read and write; syntax is beginner-friendly.\n• Open-source and free to use.\n• Supports multiple programming paradigms (object-oriented, procedural, functional).\n• Extensive standard library and strong community support."},
{"title": "Why Learn Python?",
"content": "• Widely used in web development, data science, AI, automation, and more.\n• High demand in the job market.\n• Large ecosystem with libraries for various tasks.\n• Beginner-friendly, with a fast learning curve."},
{"title": "Python Syntax Basics",
"content": "• Variables and Data Types (int, float, string, list, dictionary)\n• Basic Syntax Example:\nname = 'Python'\nprint('Hello, ' + name)\n• Indentation for defining blocks (no braces or semicolons needed)."},
{"title": "Popular Python Libraries",
"content": "• Data Science: NumPy, pandas, Matplotlib\n• Web Development: Django, Flask\n• Machine Learning & AI: TensorFlow, scikit-learn\n• Automation: Selenium, BeautifulSoup"},
{"title": "Python Applications",
"content": "• Web Development\n• Data Analysis and Visualization\n• Machine Learning and Artificial Intelligence\n• Game Development\n• Scripting and Automation"},
{"title": "Career Opportunities with Python",
"content": "• Python Developer\n• Data Scientist\n• Machine Learning Engineer\n• Web Developer\n• DevOps Engineer"},
{"title": "Resources to Learn Python",
"content": "• Python documentation: https://docs.python.org\n• Online platforms: Codecademy, Coursera, edX, Udacity\n• Books: 'Python Crash Course,' 'Automate the Boring Stuff with Python'"},
{"title": "Summary",
"content": "Why Python is a great language to learn.\nEncouragement to start coding and exploring Python."},
]
# Add slides
for slide_info in slides_content:
slide_layout = prs.slide_layouts[1] # Using the Title and Content layout
slide = prs.slides.add_slide(slide_layout)
title = slide.shapes.title
content = slide.placeholders[1]
# Set title and content for each slide
title.text = slide_info["title"]
content.text = slide_info["content"]
# Save the presentation
pptx_path = "Introduction_to_Python_Presentation.pptx"
prs.save(pptx_path)
print(f"Presentation saved as {pptx_path}")
from pptx import Presentation
from pptx.util import Inches, Pt
# Create a presentation object
prs = Presentation()
# Define slides content
slides_content = [
{"title": "Introduction to Python", "content": "The Versatile Programming Language\nYour Name or Center’s Name"},
{"title": "What is Python?",
"content": "• Python is a high-level, interpreted programming language.\n• Known for its simplicity and readability.\n• Created by Guido van Rossum and first released in 1991."},
{"title": "Key Features of Python",
"content": "• Easy to read and write; syntax is beginner-friendly.\n• Open-source and free to use.\n• Supports multiple programming paradigms (object-oriented, procedural, functional).\n• Extensive standard library and strong community support."},
{"title": "Why Learn Python?",
"content": "• Widely used in web development, data science, AI, automation, and more.\n• High demand in the job market.\n• Large ecosystem with libraries for various tasks.\n• Beginner-friendly, with a fast learning curve."},
{"title": "Python Syntax Basics",
"content": "• Variables and Data Types (int, float, string, list, dictionary)\n• Basic Syntax Example:\nname = 'Python'\nprint('Hello, ' + name)\n• Indentation for defining blocks (no braces or semicolons needed)."},
{"title": "Popular Python Libraries",
"content": "• Data Science: NumPy, pandas, Matplotlib\n• Web Development: Django, Flask\n• Machine Learning & AI: TensorFlow, scikit-learn\n• Automation: Selenium, BeautifulSoup"},
{"title": "Python Applications",
"content": "• Web Development\n• Data Analysis and Visualization\n• Machine Learning and Artificial Intelligence\n• Game Development\n• Scripting and Automation"},
{"title": "Career Opportunities with Python",
"content": "• Python Developer\n• Data Scientist\n• Machine Learning Engineer\n• Web Developer\n• DevOps Engineer"},
{"title": "Resources to Learn Python",
"content": "• Python documentation: https://docs.python.org\n• Online platforms: Codecademy, Coursera, edX, Udacity\n• Books: 'Python Crash Course,' 'Automate the Boring Stuff with Python'"},
{"title": "Summary",
"content": "Why Python is a great language to learn.\nEncouragement to start coding and exploring Python."},
]
# Add slides
for slide_info in slides_content:
slide_layout = prs.slide_layouts[1] # Using the Title and Content layout
slide = prs.slides.add_slide(slide_layout)
title = slide.shapes.title
content = slide.placeholders[1]
# Set title and content for each slide
title.text = slide_info["title"]
content.text = slide_info["content"]
# Save the presentation
pptx_path = "Introduction_to_Python_Presentation.pptx"
prs.save(pptx_path)
print(f"Presentation saved as {pptx_path}")