Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Program to learn German articles.
#1
I made a program to learn articles in German. It shows one of the 771 random nouns and you have to guess if it is a der, die, or das word.



[Image: Screenshot-2024-10-24-203042.png]


Attached Files
.zip   German.zip (Size: 1.55 MB / Downloads: 30)
Reply
#2
Just a note for those who want to learn German grammar: In German there is no fixed rule for the use of articles, one just have to know it (learn it by heart).  Tongue

Mark Twain - The Awful German Language

Surely there is not another language that is so slip-shod
and systemless, and so slippery and elusive to the grasp.
One is washed about in it, hither and hither, in the most
helpless way; and when at last he thinks he has captured a
rule which offers firm ground to take a rest on amid the
general rage and turmoil of the ten parts of speech, he
turns over the page and reads, “Let the pupil make careful 
note of the following exceptions."
He runs his eye down and finds that there are more exceptions 
to the rule than instances of it.
Reply
#3
The Chrome browser refuses to download the file, but as the second screenshot shows, Windows does not find any threat.

Not the first time. Where ist the problem or the error?


[Image: German-zip-Virus-Warnung.jpg]


[Image: German-keine-Bedrohung2024-10-25-213856.jpg]
Reply
#4
(10-25-2024, 12:16 PM)Kernelpanic Wrote: Just a note for those who want to learn German grammar: In German there is no fixed rule for the use of articles, one just have to know it (learn it by heart).  Tongue

Mark Twain - The Awful German Language

Surely there is not another language that is so slip-shod
and systemless, and so slippery and elusive to the grasp.
One is washed about in it, hither and hither, in the most
helpless way; and when at last he thinks he has captured a
rule which offers firm ground to take a rest on amid the
general rage and turmoil of the ten parts of speech, he
turns over the page and reads, “Let the pupil make careful 
note of the following exceptions."
He runs his eye down and finds that there are more exceptions 
to the rule than instances of it.

I think Mark Twain overlooked the English language! For every "rule" there are at least 10 exceptions, in both spelling and grammar. This is because English is such a bastardisation of so many other languages - including, among others, German, French, Latin, and Greek. I refer you to the English page on the website in my signature.
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.) Big Grin
Please visit my Website at: http://oldendayskids.blogspot.com/
Reply
#5
Cannot be downloaded with EDGE either. It could be the host server of the QB64 site that is causing the German versions of the browser, in conjunction with Windows Defender, to report a threat that does not exist.

Perhaps one of the developers could upload this file to his GitHub account. If I can download it from there without a threat report, then it is the hoster's fault, otherwise... no more ideas.

[Image: German-zip-EDGE-2024-10-26-145702.jpg]
Reply
#6
The zip contains the following.

BAS FILE:
Code: (Select All)
Screen _NewImage(1920, 1080, 256)
_FullScreen , _Smooth
For i = 1 To 255
    _MapUnicode i To i
Next i
geluid = 1
begin:
Font& = _LoadFont("lucon.ttf", 28, "MONOSPACE")
Font1& = _LoadFont("lucon.ttf", 24, "MONOSPACE")
Font2& = _LoadFont("lucon.ttf", 84, "MONOSPACE")
tekstkleur& = _RGB(28, 0, 105)
tekstkleur1& = _RGB(144, 144, 128)

If Font& = 0 Then
    Print "No font!": Beep
    End
End If

Cls
_PaletteColor 0, _RGB32(216, 211, 205)
Color tekstkleur&
Dim regel As String
Dim regels(10000) As String
Dim totaalRegels As Long
Dim willekeurigIndex As Long
Dim woord As String
Dim geslacht As String
Dim kommaPositie As Long
Randomize Timer
Open "woorden.txt" For Input As #1
totaalRegels = 0
Do While Not EOF(1)
    Line Input #1, regel
    totaalRegels = totaalRegels + 1
    regels(totaalRegels) = regel
Loop
Close #1

If totaalRegels = 0 Then
    Print "No lines in file!": Beep
    End
End If

willekeurigIndex = Int(Rnd * totaalRegels) + 1
kommaPositie = InStr(regels(willekeurigIndex), ",")

If kommaPositie > 0 Then
    If kommaPositie > 1 Then
        woord = Left$(regels(willekeurigIndex), kommaPositie - 1)
    Else
        woord = regels(willekeurigIndex)
    End If
    geslacht = Mid$(regels(willekeurigIndex), kommaPositie + 1)
Else
    woord = regels(willekeurigIndex)
    geslacht = ""
End If

_Font Font1&
teller = teller + 1
Locate 2, 1
Print "  Score: "; score; "/"; teller
Locate 2, 126: Print "ESC = Quit";
Locate 2, 96: Print "(Switch with s) SOUND = ";
If geluid = 1 Then Print "ON" Else Print "OFF";

Line (10, 10)-(1910, 1070), _RGB(150, 150, 127), B
Line (14, 14)-(1906, 1066), _RGB(150, 150, 127), B
_Font Font2&
Color tekstkleur1&
tekstBreedte = _PrintWidth("[" + woord + "]")
xPositie = (1920 - tekstBreedte) \ 2
yPositie = 150
_PrintString (xPositie, yPositie), "[" + woord + "]"
_Font Font&
Color tekstkleur&
tekstBreedte = _PrintWidth("What article is correct?")
xPositie = (1920 - tekstBreedte) \ 2
yPositie = 340
_PrintString (xPositie, yPositie), "Which article is correct?"
verschuif = -130

If geslacht <> "" Then
    Color 4
    tekstBreedte = _PrintWidth("1. Der " + woord)
    xPositie = (1920 - tekstBreedte) \ 2
    yPositie = 600
    _PrintString (xPositie, yPositie + verschuif), "1. Der " + woord

    tekstBreedte = _PrintWidth("2. Die " + woord)
    xPositie = (1920 - tekstBreedte) \ 2
    yPositie = 650
    _PrintString (xPositie, yPositie + verschuif), "2. Die " + woord

    tekstBreedte = _PrintWidth("3. Das " + woord)
    xPositie = (1920 - tekstBreedte) \ 2
    yPositie = 700
    _PrintString (xPositie, yPositie + verschuif), "3. Das " + woord
End If

Do
    invoer$ = InKey$
    If invoer$ = "s" And geluid = 0 Then geluid = 1: _Font Font1&: Locate 2, 96: Color tekstkleur&: Print "(Switch with s) SOUND = ON ";: Sound 900, 1: GoTo 3
    If invoer$ = "s" And geluid = 1 Then geluid = 0: _Font Font1&: Locate 2, 96: Color tekstkleur&: Print "(Switch with s) SOUND = OFF";: Sound 300, 1: GoTo 3
    3
    If invoer$ = Chr$(27) Then System
    If invoer$ = "1" Or invoer$ = "2" Or invoer$ = "3" Then Exit Do
Loop

uitslag:
correct = 0
If invoer$ = "1" And geslacht = "der" Then correct = 1
If invoer$ = "2" And geslacht = "die" Then correct = 1
If invoer$ = "3" And geslacht = "das" Then correct = 1

If correct = 1 Then
    score = score + 1
    tekstBreedte = _PrintWidth("Correct! It's indeed '" + geslacht + " " + woord + "'.")
    xPositie = (1920 - tekstBreedte) \ 2
    yPositie = 750
    Color 2
    _PrintString (xPositie, yPositie), "Correct! It's indeed '" + geslacht + " " + woord + "'."
    If geluid = 1 Then Sound 300, 2: Sound 370, 2: Sound 440, 4: Sound 585, 4
Else
    tekstBreedte = _PrintWidth("Incorrect! The right answer was '" + geslacht + " " + woord + "'.")
    xPositie = (1920 - tekstBreedte) \ 2
    yPositie = 750
    Color 12
    _PrintString (xPositie, yPositie), "Incorrect! The right answer was '" + geslacht + " " + woord + "'."
    If geluid = 1 Then For i = 1 To 160: Sound 60 + i + Int(Rnd * 1000), .03: Next i
End If

tekstBreedte = _PrintWidth("Press any key to continue...")
xPositie = (1920 - tekstBreedte) \ 2
yPositie = 1000
Color 3
_PrintString (xPositie, yPositie), "Press any key to continue..."

Do
    A$ = InKey$
    If invoer$ = "s" And geluid = 0 Then geluid = 1: _Font Font1&: Locate 2, 96: Color tekstkleur&: Print "(Switch with s) SOUND = ON ";: Sound 900, 1: GoTo 4
    If invoer$ = "s" And geluid = 1 Then geluid = 0: _Font Font1&: Locate 2, 96: Color tekstkleur&: Print "(Switch with s) SOUND = OFF";: Sound 300, 1: GoTo 4
    4
    If A$ = Chr$(27) Then System
    If A$ <> "" Then GoTo begin
Loop

And the text file (which has German encoding in it):


.txt   woorden.txt (Size: 9.01 KB / Downloads: 29)
Reply
#7
(10-25-2024, 11:23 PM)PhilOfPerth Wrote:
(10-25-2024, 12:16 PM)I think Mark Twain overlooked the English language! For every "rule" there are at least 10 exceptions, in both spelling and grammar. This is because English is such a bastardisation of so many other languages - including, among others, German, French, Latin, and Greek. I refer you to the English page on the website in my signature. Wrote:
Lots of people assume that English is a Latin descendant, which confuses them when Latin rules do not apply.  English is a Germanic language which has stolen from every other West European language it has drunkenly stumbled across.
Reply
#8
I can also not download my own ZIP file. Does anybody know how I can prevent this? I want to share it on my website eventually.
Reply
#9
@Steve, thanks for posting the file, but as @SquirrelMonkey shows, the problem still exists.
Let's see if someone can upload the file to GitHub. If the download doesn't work from there either, it would be a still unknown problem. If the download works, it would be a sign that it's probably the host server for QB64.

I think this is the fourth time that I've gotten warning messages like this when downloading from here.
Reply
#10
The zip file has the EXE in it.  I imagine that's where the issue is.  Take it out and try the download without it.
Reply




Users browsing this thread: 2 Guest(s)