|
| 1 | +from pptx import Presentation |
| 2 | + |
| 3 | +# Create a presentation object |
| 4 | +presentation = Presentation() |
| 5 | + |
| 6 | +# Title Slide |
| 7 | +slide = presentation.slides.add_slide(presentation.slide_layouts[0]) |
| 8 | +title = slide.shapes.title |
| 9 | +subtitle = slide.placeholders[1] |
| 10 | +title.text = "Python Dasturlashga Kirish" |
| 11 | +subtitle.text = "1-dars: Dasturlash asoslari va Python haqida tushunchalar" |
| 12 | + |
| 13 | +# Slide 1: Roadmap |
| 14 | +slide = presentation.slides.add_slide(presentation.slide_layouts[1]) |
| 15 | +title = slide.shapes.title |
| 16 | +content = slide.placeholders[1] |
| 17 | +title.text = "Dars Rejasi (Roadmap)" |
| 18 | +content.text = """\ |
| 19 | +1. Tanishuv |
| 20 | +2. Dasturlash haqida tushunchalar |
| 21 | +3. Kompyuterlar sozligi va hammada borligi |
| 22 | +4. Python haqida tushuncha |
| 23 | +5. Backend va frontend |
| 24 | +6. Python sohalari va imkoniyatlari |
| 25 | +7. Pythonni o'rnatish va onlayn platformalar""" |
| 26 | + |
| 27 | +# Slide 2: Dasturlash haqida |
| 28 | +slide = presentation.slides.add_slide(presentation.slide_layouts[1]) |
| 29 | +title = slide.shapes.title |
| 30 | +content = slide.placeholders[1] |
| 31 | +title.text = "Dasturlash haqida tushunchalar" |
| 32 | +content.text = """\ |
| 33 | +- Dasturlash - kompyuterga vazifalarni avtomatik bajarishni o'rgatish san'ati. |
| 34 | +- Kompyuter dasturchilarning buyruqlariga asoslangan holda ishlaydi. |
| 35 | +- Kundalik hayotimizda texnologiyaning asosiy qismi.""" |
| 36 | + |
| 37 | +# Slide 3: Python haqida tushuncha |
| 38 | +slide = presentation.slides.add_slide(presentation.slide_layouts[1]) |
| 39 | +title = slide.shapes.title |
| 40 | +content = slide.placeholders[1] |
| 41 | +title.text = "Python haqida tushuncha" |
| 42 | +content.text = """\ |
| 43 | +- Python - oddiy va qulay dasturlash tili. |
| 44 | +- 1991 yilda Guido van Rossum tomonidan yaratilgan. |
| 45 | +- Soddaligi sababli yangi boshlovchilar uchun ideal. |
| 46 | +- Juda ko'p sohalarda qo'llaniladi.""" |
| 47 | + |
| 48 | +# Slide 4: Backend va frontend |
| 49 | +slide = presentation.slides.add_slide(presentation.slide_layouts[1]) |
| 50 | +title = slide.shapes.title |
| 51 | +content = slide.placeholders[1] |
| 52 | +title.text = "Backend va Frontend" |
| 53 | +content.text = """\ |
| 54 | +- Frontend: Foydalanuvchi ko'radigan qismi (vazifa: sayt dizayni va interaktivligi). |
| 55 | +- Backend: Dastur ishlash tizimi (vazifa: ma'lumotlarni qayta ishlash va saqlash). |
| 56 | +- Backend foydalari: Kuchli logika, server boshqaruvi. |
| 57 | +- Backend zaifliklari: Ko'proq texnik bilim talab qiladi.""" |
| 58 | + |
| 59 | +# Slide 5: Python sohalari |
| 60 | +slide = presentation.slides.add_slide(presentation.slide_layouts[1]) |
| 61 | +title = slide.shapes.title |
| 62 | +content = slide.placeholders[1] |
| 63 | +title.text = "Python sohalari" |
| 64 | +content.text = """\ |
| 65 | +- Web dasturlash (backend) |
| 66 | +- Data Science |
| 67 | +- Telegram botlar |
| 68 | +- Sun'iy intellekt |
| 69 | +- Android va Desktop dasturlar""" |
| 70 | + |
| 71 | +# Slide 6: Hozir dasturchilarga talablar |
| 72 | +slide = presentation.slides.add_slide(presentation.slide_layouts[1]) |
| 73 | +title = slide.shapes.title |
| 74 | +content = slide.placeholders[1] |
| 75 | +title.text = "Hozir dasturchilarga talablar" |
| 76 | +content.text = """\ |
| 77 | +- Algoritmik fikrlash qobiliyati |
| 78 | +- Muammolarni yechish ko'nikmalari |
| 79 | +- Yangi texnologiyalarni o'rganishga qiziqish""" |
| 80 | + |
| 81 | +# Slide 7: Pythonni o'rnatish va onlayn ishlash |
| 82 | +slide = presentation.slides.add_slide(presentation.slide_layouts[1]) |
| 83 | +title = slide.shapes.title |
| 84 | +content = slide.placeholders[1] |
| 85 | +title.text = "Pythonni o'rnatish va onlayn ishlash" |
| 86 | +content.text = """\ |
| 87 | +1. Pythonni kompyuterga o'rnatish: python.org saytidan yuklab olish. |
| 88 | +2. Onlayn platformalar: |
| 89 | + - Replit (replit.com) |
| 90 | + - Google Colab (colab.research.google.com)""" |
| 91 | + |
| 92 | +# Save the presentation |
| 93 | +file_path = "/mnt/data/Python_Dars_1.pptx" |
| 94 | +presentation.save(file_path) |
| 95 | + |
| 96 | +file_path |
0 commit comments