Home Optimizing ChatGPT Usage Create flashcards for your foreign language learning, with ChatGPT

Create flashcards for your foreign language learning, with ChatGPT

by Massimo

How can you create a series of flashcards to print out to learn new foreign language words? Let’s use ChatGPT.

Discover the transformative way of learning with custom flashcards using ChatGPT and Powerpoint. This guide takes you through the simple yet effective process of creating dual-sided flashcards in PowerPoint, designed to enhance your language learning or any subject matter that requires active recall and spaced repetition.

Problem

Students and educators often struggle to find effective and personalized learning tools that cater to the need for active recall and spaced repetition, essential for long-term retention. Commercial flashcards may not align perfectly with individual learning objectives or curricula, and creating custom study materials can be time-consuming and technically challenging.

Solution with ChatGPT: create a Powerpoint with flashcards of the words I want to learn, starting from a template I created.

PROMPT for CHATGPT:
Create flashcards in A4 pages from a list of german words I put below. Each page will have a table made by 9 words formatted in 3 columns like in the attached image. create flashcards for the following words, alternating slides with one slide with 6 words below and one slide with the translation in English of these 6 words

. This process will create 9 flashcards per page with the german keywords and their translations on the back. The table with the keywords will have a white background color.

Words:
Verkehrsmittel
(U/S-)Bahn die, -en
Bus der, -se
Flugzeug das, -e
Lkw der, -s
Richtungsangaben
geradeaus
links
rechts
(da) drüben
Unterwegs mit Zug/Flugzeug
Abfahrt die
Abflug der, e
Ankunft die
Anschluss der, -e
Ausgang der, ie
Eingang der, e
Bahnsteig der,-e
Bushaltestelle die, -n
Durchsage die, -n
Fahrplan der, e
Flughafen der, :
Gleis das, -e
Reisebüro das, -s
Schalter der, –
Ticket das, -s
Verspätung die
ab. fahren, du fährst ab,
er fährt ab,
(ist abgefahren)
Straßenbahn die, -en
Taxi das, -s
Zug der, ie
(da) vorne
(da) hinten
(da) oben
(da) unten
fliegen, ist geflogen
ab-fliegen,
(ist abgeflogen)
an kommen,
(ist angekommen)
aus-steigen
(ist ausgestiegen)
ein•steigen,
(ist eingestiegen)
um•steigen,
(ist umgestiegen)
weit
wie weit
zu weit
zurück
hin und zurück

Output

A Powerpoint slide is created using Visual Basic code I am sharing below. The format is like what you see below:

The VBA created is this one:

# Define the German words and their English translations
german_words = [
“Verkehrsmittel”, “Richtungsangaben”, “Unterwegs mit Zug/Flugzeug”,
“(U/S-)Bahn die, -en”, “geradeaus”, “Abfahrt die”,
“Bus der, -se”, “links”, “Abflug der, -e”,
“Flugzeug das, -e”, “rechts”, “Ankunft die”,
“Lkw der, -s”, “(da) drüben”, “Anschluss der, -e”,
“Straßenbahn die, -en”, “Bahnsteig der,-e”, “Ausgang der, -ie”,
“Taxi das, -s”, “Bushaltestelle die, -n”, “Eingang der, -e”,
“Zug der, -ie”, “Durchsage die, -n”, “Fahrplan der, -e”,
“(da) vorne”, “Flughafen der, -“, “Gleis das, -e”,
“(da) hinten”, “Reisebüro das, -s”, “Schalter der, -“,
“(da) oben”, “Ticket das, -s”, “Verspätung die”,
“(da) unten”, “ab. fahren, du fährst ab, er fährt ab, (ist abgefahren)”, “weit”,
“fliegen, ist geflogen”, “wie weit”, “zu weit”,
“ab-fliegen, (ist abgeflogen)”, “zurück”, “hin und zurück”,
“an kommen, (ist angekommen)”, “aus-steigen (ist ausgestiegen)”, “ein•steigen, (ist eingestiegen)”,
“um•steigen, (ist umgestiegen)”
]

english_translations = [
“Means of transport”, “Directions”, “Traveling by train/plane”,
“Train, -s”, “straight ahead”, “Departure”,
“Bus, -ses”, “left”, “Takeoff, -s”,
“Airplane, -s”, “right”, “Arrival”,
“Truck, -s”, “over there”, “Connection, -s”,
“Tram, -s”, “Platform, -s”, “Exit, -s”,
“Taxi, -s”, “Bus stop, -s”, “Entrance, -s”,
“Train, -s”, “Announcement, -s”, “Timetable, -s”,
“in the front”, “Airport, -s”, “Track, -s”,
“in the back”, “Travel agency, -s”, “Counter, -s”,
“up there”, “Ticket, -s”, “Delay”,
“down there”, “to depart, you depart, he departs, (has departed)”, “far”,
“to fly, has flown”, “how far”, “too far”,
“to take off, (has taken off)”, “back”, “round trip”,
“to arrive, (has arrived)”, “to disembark (has disembarked)”, “to board, (has boarded)”,
“to transfer, (has transferred)”
]

# Function to create a table with specified styling for flashcards
def create_styled_table(words, slide, num_rows, num_columns):
rows = num_rows
cols = num_columns
left = top = Inches(0.5)
width = Inches(10.69) # A4 width – 1 inch for margins
height = Inches(7.27) # A4 height – 1 inch for margins

table = slide.shapes.add_table(rows, cols, left, top, width, height).table

# Set table style
table.first_row = False
table.horz_banding = False
table.vert_banding = False

for r_idx in range(rows):
for c_idx in range(cols):
idx = r_idx * cols + c_idx
if idx < len(words):
cell = table.cell(r_idx, c_idx)
cell.text = words[idx].upper()
cell.fill.solid()
cell.fill.fore_color.rgb = RGBColor(255, 255, 255) # White background
cell.margin_left = Inches(0.1)
cell.margin_right = Inches(0.1)
cell.margin_top = Inches(0.1)
cell.margin_bottom = Inches(0.1)
text_frame = cell.text_frame
text_frame.word_wrap = True
p = text_frame.paragraphs[0]
p.alignment = PP_ALIGN.CENTER
for run in p.runs:
run.font.size = Pt(18)
run.font.bold = True
run.font.color.rgb = RGBColor(0, 0, 0) # Black color for visibility

# Re-initialize Presentation
prs = Presentation()

# Set slide width and height for A4 paper size
prs.slide_width = Inches(11.69)
prs.slide_height = Inches(8.27)

# Create slides for German words and their English translations
for page_num in range(num_pages):
# German words slide
slide_german = prs.slides.add_slide(prs.slide_layouts[5])
start_idx = page_num * num_rows * num_columns
end_idx = start_idx + num_rows * num_columns
page_words_german = german_words[start_idx:end_idx]
create_styled_table(page_words_german, slide_german, num_rows, num_columns)

# English translations slide
slide_english = prs.slides.add_slide(prs.slide_layouts[5])
page_words_english = english_translations[start_idx:end_idx]
create_styled_table(page_words_english, slide_english, num_rows, num_columns)

# Save the new version of the presentation
new_flashcards_pptx = ‘/mnt/data/german_english_flashcards_styled.pptx’
prs.save(new_flashcards_pptx)

new_flashcards_pptx

What's next?

My next prompt will be to create new version with new words to learn:

PROMPT: 

create new version with the following list of keywords to learn:
[list of keywords to put in the flashcards]


OR:

create flashcards for the following words, alternating slides with one slide with 6 words below and one slide with the translation in English of these 6 words


(U/S-)Bahn die, -en

Bus der, -se

Flugzeug das, -e

Lkw der, -s

(U/S-)Bahn die, -en

Bus der, -se

Flugzeug das, -e

Lkw der, -s

geradeaus

links

rechts

(da) drüben

(da) vorne

(da) hinten

(da) oben

(da) unten

Abfahrt die

Abflug der, e

Ankunft die

Anschluss der, -e

Ausgang der, e

Eingang der, Fe

Bahnsteig der, -e

Bushaltestelle die, -n

Durchsage die, -n

Fahrplan der, Fe

Flughafen der, –

Gleis das, -e

Reisebüro das, -s

Schalter der, –

Ticket das, -s

Verspätung die

ab fahren – du fährst ab – er fährt ab – (ist abgefahren)

fliegen – ist geflogen 

ab fliegen- (ist abgeflogen)

an kommen – (ist angekommen)

aussteigen – (ist ausgestiegen)

einsteigen – ist eingestiegen

umsteigen – (ist umgestiegen)

weit

wie weit – zu weit

zurück

hin und zurück

That will create this Python code:
# Define the new set of German words and their English translations
german_words_subset = [
    “(U/S-)Bahn die, -en”, “Bus der, -se”, “Flugzeug das, -e”, “Lkw der, -s”,
    “(U/S-)Bahn die, -en”, “Bus der, -se”, “Flugzeug das, -e”, “Lkw der, -s”,
    “geradeaus”, “links”, “rechts”, “(da) drüben”, “(da) vorne”, “(da) hinten”,
    “(da) oben”, “(da) unten”, “Abfahrt die”, “Abflug der, -e”, “Ankunft die”,
    “Anschluss der, -e”, “Ausgang der, -e”, “Eingang der, -e”, “Bahnsteig der, -e”,
    “Bushaltestelle die, -n”, “Durchsage die, -n”, “Fahrplan der, -e”,
    “Flughafen der, -“, “Gleis das, -e”, “Reisebüro das, -s”, “Schalter der, -“,
    “Ticket das, -s”, “Verspätung die”, “ab fahren – du fährst ab – er fährt ab – (ist abgefahren)”,
    “fliegen – ist geflogen”, “ab fliegen- (ist abgeflogen)”, “an kommen – (ist angekommen)”,
    “aussteigen – (ist ausgestiegen)”, “einsteigen – (ist eingestiegen)”, “umsteigen – (ist umgestiegen)”,
    “weit”, “wie weit – zu weit”, “zurück”, “hin und zurück”
]

english_translations_subset = [
    “Train, -s”, “Bus, -ses”, “Airplane, -s”, “Truck, -s”,
    “Train, -s”, “Bus, -ses”, “Airplane, -s”, “Truck, -s”,
    “straight ahead”, “left”, “right”, “over there”, “in the front”, “in the back”,
    “up there”, “down there”, “Departure”, “Takeoff, -s”, “Arrival”,
    “Connection, -s”, “Exit, -s”, “Entrance, -s”, “Platform, -s”,
    “Bus stop, -s”, “Announcement, -s”, “Timetable, -s”,
    “Airport, -s”, “Track, -s”, “Travel agency, -s”, “Counter, -s”,
    “Ticket, -s”, “Delay”, “to depart, you depart, he departs, (has departed)”,
    “to fly, has flown”, “to take off, (has taken off)”, “to arrive, (has arrived)”,
    “to disembark (has disembarked)”, “to board, (has boarded)”, “to transfer, (has transferred)”,
    “far”, “how far – too far”, “back”, “round trip”
]

# Re-initialize Presentation
prs = Presentation()

# Set slide width and height for A4 paper size
prs.slide_width = Inches(11.69)
prs.slide_height = Inches(8.27)

# Create slides for German words and their English translations in groups of 6
for i in range(0, len(german_words_subset), 6):
    # German words slide
    slide_german = prs.slides.add_slide(prs.slide_layouts[5])
    words_group = german_words_subset[i:i+6]
    create_styled_table(words_group, slide_german, 2, 3)

    # Check if the corresponding English translations group exists
    if i < len(english_translations_subset):
        # English translations slide
        slide_english = prs.slides.add_slide(prs.slide_layouts[5])
        translations_group = english_translations_subset[i:i+6]
        create_styled_table(translations_group, slide_english, 2, 3)

# Save the new version of the presentation
alternating_flashcards_pptx = ‘/mnt/data/german_english_flashcards_alternating.pptx’
prs.save(alternating_flashcards_pptx)

alternating_flashcards_pptx

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More