The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 304 Weeks Ago, 5 Days Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
needs to be programmed in python with *.py attachment
--------------------------------------------------------------------------------------
a well-documented Python program that will generate a set of arithmetic problems and place them in a text file.  Here is how the program could look like
Â
The program asks the user how many problems does he/she want to generate in the text file. At least one problem could be generated and a max of 100 problems. Your program should do boundary checking.
Next the program should ask the number of digits wanted in the problem set. Example if the user selects 2 digits then the program should generate problems like
-Â Â Â Â Â Â Â Â Â 32+44=
-Â Â Â Â Â Â Â Â Â 27/3=
If the user selects 3 digits for example, then problems could look like
-Â Â Â Â Â Â Â Â Â 276+234=
-Â Â Â Â Â Â Â Â Â 998*436=Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
The program should make sure the user does not enter more than 4 digits and no less than 1 digit. The program then should ask what kind of operations to generate. The user can select all four operations shown above, or some of them by answering (Y/N) or (y/n).
The program should generate the question in a file called gen_problems.txt and should also generate a second file called gen_problems_answer.txt in the same folder.
To put some twist to the program. Make sure your division operation yields only to full integers. So 9/3 is a full integer but 10/3 is not
Attachments:
----------- He-----------llo----------- Si-----------r/M-----------ada-----------m -----------Tha-----------nk -----------you----------- fo-----------r y-----------our----------- in-----------ter-----------est----------- an-----------d b-----------uyi-----------ng -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------. P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll -----------be -----------qui-----------ckl-----------y