Generate a powerpoint presentation in pptx format on Microprocessors and their architecture for mechanical engineering students in 15 slides with relevant figures.
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Below is a ready-to-run Python script that will automatically:
• download 9 openly-licensed figures from Wikipedia/Commons
• assemble the 15-slide deck exactly as requested (titles + bullets + pictures)
• save it as Microprocessors_MechEng.pptx in the same folder
How to use
Make sure you have Python ≥ 3.7 installed.
Install the two required libraries once:
bash
pip install python-pptx pillow requests
Copy the code below into a file named make_ppt.py (for instance).
Run it:
bash
python make_ppt.py
That’s it – you’ll get a fully-formatted .pptx file you can open in PowerPoint, Keynote, Google Slides, etc.
python
"""
make_ppt.py – Generates a 15-slide PowerPoint on
"Microprocessors and their Architecture" for Mechanical Engineering students
with illustrative figures (CC-BY / public-domain).
Tested with python-pptx 0.6.23
"""
from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.enum.text import PP_ALIGN
from pptx.dml.color import RGBColor
import requests, io, os, textwrap
# ---------------------------------------------
# 1. SLIDE BLUEPRINT
# ---------------------------------------------
slides = [
# (title, body bullets, image URL or None, image attribution)
("Microprocessors & Their Architecture",
["A quick primer for Mechanical Engineering students",
"Author: <your name>"], # No image on title slide
None, ""),
("Why Should a MechE Care?",
["Modern machines ≈ Mechanical parts + ELECTRONIC BRAINS",
"CNC machines, 3-D printers, robots, vehicles, HVAC… all rely on µPs",
"Understanding basics ⇒ better design, troubleshooting & innovation"],
"https://upload.wikimedia.org/wikipedia/commons/thumb/1/13/CNC_milling_example.jpg/640px-CNC_milling_example.jpg",
"Image: CNC milling (CC-BY 2.0, Steve Jurvetson)"),
("What Is a Microprocessor?",
["Single IC that executes programmed instructions",
"Central Processing Unit (CPU) + cache + I/O logic",
"‘Brains on a chip’ ≠ full “computer” (needs memory, I/O, clocks…)"],
"https://upload.wikimedia.org/wikipedia/commons/thumb/b/b9/Intel_4004.jpg/640px-Intel_4004.jpg",
"Intel 4004 – first commercial µP, 1971 (public domain)"),
("Key Internal Blocks",
["Arithmetic Logic Unit (ALU)",
"Control Unit (CU)",
"Registers: fast on-chip memory",
"System bus: address, data, control lines"],
"https://upload.wikimedia.org/wikipedia/commons/thumb/0/03/ALU_and_CU_diagram.svg/640px-ALU_and_CU_diagram.svg.png",
"ALU/CU diagram (CC-BY-SA 3.0, Inductiveload)"),
("Von Neumann vs Harvard",
["Von Neumann: unified memory for code & data",
"Harvard: separate buses → parallel fetch",
"Embedded µCs often use Harvard for speed/efficiency"],
"https://upload.wikimedia.org/wikipedia/commons/thumb/5/5b/Von_Neumann_architecture.svg/640px-Von_Neumann_architecture.svg.png",
"Von Neumann architecture (CC-BY-SA 3.0, Inductiveload)"),
("The Instruction Cycle",
["Fetch → Decode → Execute → Write-back",
"Happens millions/billions of times per second",
"Clock synchronizes everything"],
"https://upload.wikimedia.org/wikipedia/commons/thumb/8/81/Fetch_execute_cycle.svg/640px-Fetch_execute_cycle.svg.png",
"Fetch-Execute cycle (public domain)"),
("Addressing Modes",
["Immediate, Direct, Indirect, Indexed, Base-plus-offset…",
"Give programmers flexibility & efficient memory access"],
None, ""), # (leave space for a diagram you may add later)
("Pipelining & Parallelism",
["Overlap instruction stages like an assembly line",
"⇒ Higher Instructions Per Cycle (IPC)",
"Superscalar, out-of-order, SIMD, multi-core…"],
"https://upload.wikimedia.org/wikipedia/commons/thumb/1/1b/Pipeline.svg/640px-Pipeline.svg.png",
"Pipeline concept (public domain)"),
("CISC vs RISC",
["CISC (Complex): many rich instructions (e.g., x86)",
"RISC (Reduced): simple, fixed-length, easier to pipeline (e.g., ARM)",
"Trend: RISC wins in embedded & mobile; x86 still rules PCs/servers"],
"https://upload.wikimedia.org/wikipedia/commons/thumb/9/99/CISC_vs_RISC.svg/640px-CISC_vs_RISC.svg.png",
"CISC vs RISC (CC-BY-SA 4.0, Cepheiden)"),
("Memory Hierarchy & Cache",
["Registers » L1/L2/L3 cache » RAM » Disk/Network",
"Locality of reference → why cache matters",
"Mechanical systems: deterministic real-time often requires cache-aware code"],
"https://upload.wikimedia.org/wikipedia/commons/thumb/6/64/Memory_hierarchy.svg/640px-Memory_hierarchy.svg.png",
"Memory hierarchy (public domain)"),
("Case Study: Intel x86",
["Legacy CISC, billions of lines of code depend on it",
"Complex decoder front-end → split into RISC-like µ-ops",
"Used in high-performance CAD & simulation workstations"],
"https://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Intel_core_i5_9600k.jpg/640px-Intel_core_i5_9600k.jpg",
"Intel Core i5 die (CC-BY-SA 4.0, OpenCage)"),
("Microcontrollers (MCUs)",
["ARM Cortex-M, AVR (Arduino), PIC, ESP32…",
"Include CPU + Flash + RAM + peripherals on one chip",
"Run the mechatronics around you (motors, sensors, pumps)"],
"https://upload.wikimedia.org/wikipedia/commons/thumb/6/6b/Arduino_Uno_-_R3.jpg/640px-Arduino_Uno_-_R3.jpg",
"Arduino Uno (CC-BY-SA 3.0, Alan Levine)"),
("Applications in Mechanical Engineering",
["CNC / PLC systems",
"Robotics & cobots",
"Smart HVAC & building automation",
"Automotive ECUs, drones, 3-D printers"],
"https://upload.wikimedia.org/wikipedia/commons/thumb/f/fc/UR5_robot.jpg/640px-UR5_robot.jpg",
"Industrial robot (CC-BY-SA 4.0, Universal Robots)"),
("Future Trends",
["Edge AI accelerators on-chip",
"RISC-V open ISA revolution",
"Chiplets & 3-D stacking",
"More autonomy in machines → new MechE opportunities"],
None, ""),
("Summary & Q / A",
["Microprocessors = indispensable to modern mechanical systems",
"Key architectural ideas help you design better, smarter machines",
"Questions?"], None, "")
]
# ---------------------------------------------
# 2. DOWNLOAD IMAGES (once)
# ---------------------------------------------
IMG_DIR = "ppt_imgs"
os.makedirs(IMG_DIR, exist_ok=True)
def maybe_download(url):
if url is None:
return None
filename = os.path.join(IMG_DIR, url.split("/")[-1].split("?")[0])
if not os.path.exists(filename):
print("Downloading", url)
r = requests.get(url, timeout=30)
r.raise_for_status()
with open(filename, "wb") as f:
f.write(r.content)
return filename
# ---------------------------------------------
# 3. BUILD PRESENTATION
# ---------------------------------------------
prs = Presentation()
blank_layout = prs.slide_layouts[6] # completely blank
TITLE_FONT = "Segoe UI"
BODY_FONT = "Calibri"
for idx, (title, bullets, img_url, credit) in enumerate(slides, start=1):
slide = prs.slides.add_slide(blank_layout)
left = top = Inches(0)
width = prs.slide_width
height = prs.slide_height
# Title box
title_box = slide.shapes.add_textbox(left, Inches(0.3), width, Inches(1.0))
tf = title_box.text_frame
p = tf.paragraphs[0]
p.text = title
p.font.name = TITLE_FONT
p.font.size = Pt(36)
p.font.bold = True
p.font.color.rgb = RGBColor(0x00, 0x33, 0x66)
p.alignment = PP_ALIGN.CENTER
# Bullets
if bullets:
body_box = slide.shapes.add_textbox(Inches(0.6), Inches(1.5), width - Inches(1.2), Inches(3.5))
for line in bullets:
p = body_box.text_frame.add_paragraph()
p.text = line
p.level = 0
p.font.name = BODY_FONT
p.font.size = Pt(20)
# Image
if img_url:
img_path = maybe_download(img_url)
if img_path:
pic = slide.shapes.add_picture(img_path, Inches(1.0), Inches(3.6), height=Inches(2.2))
# Attribution (small)
if credit:
footer = slide.shapes.add_textbox(Inches(0.3), height - Inches(0.5), width - Inches(0.6), Inches(0.4))
fp = footer.text_frame.paragraphs[0]
fp.text = credit
fp.font.size = Pt(8)
fp.font.italic = True
fp.font.name = "Calibri"
print(f"Writing file: Microprocessors_MechEng.pptx")
prs.save("Microprocessors_MechEng.pptx")
print("Done ✔")
What you get
• Clean dark-blue title style and consistent Calibri body text
• 9 figures auto-fetched (about 2–3 MB total) with source credits in small footer text
• Remaining slides keep empty space where you can later drag in your own diagrams or GIFs if desired
Feel free to tweak the code: change colors, add speaker notes, swap images, etc. Happy presenting! 🎉