Posts

Showing posts from February, 2021

Some Adaptable Exercises For Programming Practice

Here are five nice ideas for programming exercises, originally intended for Python beginners but probably applicable to many languages. From Reddit r/learnpython posted by u/NoSide005 "5 Projects For Beginners To Learn Python" User inputs Create an app that asks the user to input one character that must be a vowel. Continue asking for the input until a vowel is inputted. You can also give user feedback every time a non-vowel is entered or upon a successful input. Write a function Write a function that takes in a positive integer and returns its multiplicative persistence, which is the number of times you must multiply the digits in the integer until you reach a single digit. For example the integer 39 returns 3. You get this by taking 39 and multiplying its digits 3*9 which equals 27. You then multiply 27's digits 2*7 = 14. Lastly 1*4 = 4 which is a single digit. You had to multiply 3 times so you return 3. The integer 999 would return 4. Calculator a