Please register to participate in our discussions with 2 million other members - it's free and quick! Some forums can only be seen by registered members. After you create your account, you'll be able to customize options and access all our 15,000 new posts/day with fewer ads.
I have some basic familiarity with writing code, but for web pages only.
How difficult would it be to make a program that would quiz you on words that you enter?
For example, I could enter in the foreign words and the English meaning, and then when the program would run, it would bring up the foreign word, and I would type an answer in English.
SO, am I out of my league, or is this fairly easy?
If you search the Internet, you will find several applications that can translate for you. If you enter a misspelled word, then it probably cant't help you much, but not so if you enter the same misspelled word in a language dictionary. Some of both, translators and dictionaries, are used online, while others you can download and use a home on your computer. Some are free, and some aren't. For example, I use an application called Nisus Writer Pro that can use to type documents in other languages and correct the misspelled words for me as I type. It has several dictionaries, and it can be set so that the English I use transfers to the other language symbols automatically. Some times it confuses me at the beginning, until I become familiar with the keyboard layout
To learn to speak another language, it's hard to beat a system such as the Pimsleur, Rosetta, and others out there. Or anything where you can listen to spoken language and then repeat as you are told what is being said ahead of time. When I was in the military and had to learn another language, I had to take crash courses where I only spoke and listened to that language in the classroom. I could only use English to ask something to the teacher. For example, to clarify something for me, and of course to translate meanings in my mind. After a while you start thinking in the other language, but this takes some time. Pimsleur Method - Authorized Pimsleur Dealer - Save on Pimsleur
Iuf such a type of programming is not difficult to you, why not getting in touch with the companies that engage in language translators and such? Nothing to lose...right?
I am dong fine with the traditional methods of learning languages, but am more interested in how to make a program that is similar to flashcards. So I could put all the words in a database, and the program would randomly select words to quiz me.
However, I am not familiar with the programming that would accomplish that. That is more or less what I am asking.
I don't know really...I thought it would be kind of cool.
Location: Mableton, GA USA (NW Atlanta suburb, 4 miles OTP)
11,334 posts, read 26,094,260 times
Reputation: 3995
Quote:
Originally Posted by DrEarth
I have some basic familiarity with writing code, but for web pages only.
How difficult would it be to make a program that would quiz you on words that you enter?
For example, I could enter in the foreign words and the English meaning, and then when the program would run, it would bring up the foreign word, and I would type an answer in English.
SO, am I out of my league, or is this fairly easy?
That doesn't sound too difficult. Write two little programs ... one to save the foreign and English words to a file of some type, and the other to bring up the foreign words in the previously saved file, ask for input, and then let you know if your answer matches the previously saved answer.
Of course, most of the "difficulty" found in so-called modern programming is in two areas: setting up a development environment to begin with, and learning how to create and manipulate user interfaces.
That's where older microcomputers had an advantage, in my opinion. Most came with a variant of BASIC, and writing a program in many cases was as simple as:
:NEW PROGRAM
:10 PRINT "THIS IS A NEW PROGRAM. W00T!"
:20 GOTO 10
:SAVE
:RUN PROGRAM
You could write such a program in a simple text environment using a language like Perl, python, BASIC, REXX, or something. There are lots of choices, and most are free.
What environment do you want your program to run in? Windows? Linux? On a web site? Something else?
I am dong fine with the traditional methods of learning languages, but am more interested in how to make a program that is similar to flashcards. So I could put all the words in a database, and the program would randomly select words to quiz me.
However, I am not familiar with the programming that would accomplish that. That is more or less what I am asking.
I don't know really...I thought it would be kind of cool.
What RCsteiner said is accurate, what you really need to learn is a moderate level of a scripting language such as VBScript, PowerShell, Pearl or Ruby to accomplish what you were asking for in your last post.
Scripting language use a syntax that is a lot more similar to plain English language and a simple IF...THEN...ELSE type command alone could help you accomplish this task. To break it down; you create a script and define the value (answer) for an object (which will be displayed in a question form to the user). Let's say the value (answer) is "ANSWER", and let's assume the question is "a word that would be the outcome of a question". The script will ask the question and wait for user's input (for user to type in the answer). IF the user types "answer" THEN the script would return "correct!"
for any other responses, the script will resort to the value stated with the ELSE, (for example) "incorrect, please try again".
If the above example satisfies what you were trying to accomplish, then in a Windows environment, you could use VBScript or even better PowerShell v2. For more operating system independent purposes, Ruby or Pearl might be more suitable. All of them are freely available from the Internet along with tons of tutorials and guides to help you without even purchasing a single book.
Again, I am not a programmer by any means, merely a casual script guy at best.
One thing to note is that has no security so you can't use it on live site.
You can modify the address book example for easy insertion to create your database of words. From there you would need to create a script to to randomly pull one row which wouldn't be hard. A quick search brings up this example:
IMO, such a program is super-easy in the old Basic syntax, but I would have a multiple choice answer rather than having the user type and possibly mis-spell an answer in English.
QUESTION1LABEL:
PRINT "Voulez vous coucher avec moi?"
PRINT "1. Are you on the couch?"
PRINT "2. Are you crouching?"
PRINT "3. Would you like to go to bed with me?"
PRINT "4. None of the above."
PRINT " "
PRINT "Select one"
PRINT " "
DO UNTIL
INKEY$ > "0" AND INKEY$ < "5"
LOOP
Answer$ = INKEY$
CorrectAnswer$ = "3"
IF Answer$ = CorrectAnswer$ THEN
PRINT "Correct!"
ELSE
PRINT "Incorrect!"
END IF
QUESTION2LABEL:
...and so on.
Questions and possible responses can be held in arrays, with random answers for the incorrect ones. That means the stuff under the first label doesn't need to be repeated, only called as a routine or subroutine.
Last edited by rcsteiner; 01-04-2011 at 03:10 PM..
Please register to post and access all features of our very popular forum. It is free and quick. Over $68,000 in prizes has already been given out to active posters on our forum. Additional giveaways are planned.
Detailed information about all U.S. cities, counties, and zip codes on our site: City-data.com.