How to make for loop faster in python?

How would I make a studying program in python?

  • I am trying to make a program that will display a word at random word. Then I am prompted to give a translation. If I'm right or wrong it will say so and then display the next word for me to translate. I am completely new to python, so I'm not sure exactly how to programs strings, or generators, or do if statements. Also how would I make the program run until I say I want to shut it down. Or do I just make it an infinite loop? Help? *I have python 2.7.2 on my computer

  • Answer:

    Python has a powerful List feature which would suit your needs. You could either create two lists and match the word in one list and the translation in the second list or use a single list with he words paired. If statements are fairly standard and can be used after, for example, 10 questions to determine if the user wants to continue. There is extensive documentation and tutorials available for Python.

Aoi at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

Use java

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.