Challenges

1. What is your favorite color (White, Blue, Red, Green, Gray, Yellow)? Use <STDIN> for user interaction.  


2. Determine the acronym of a set of words. Use <STDIN> for user interaction.


3. Add two numbers between 0 and 100. Use <STDIN> for user interaction;


4. Is a number odd or even. Use <STDIN> for user interaction.


5. Determine the area of a circle. Use <STDIN> for user interaction.


6. Determine the initials of names. Use <STDIN> for user interaction.


7. What is the average of each student's math scores, processing a CSV file ('Sebastian', scores 45, 60, 72; 'Daniel', scores 55, 65, 70; 'Florence', scores 71, 79)  


8. What is the lowest number in an array with numbers 9, 8, 7, 5, 6, 2, 1, 12, 14, 0, 13  


9. What is the average of a list with numbers 0, 7, 5, 3, 22, 23, 11, 34, 51, 32, 5, 3, 1  


10. Determine the highest number out of three numbers  


11. Is x a multiple of y? Use <STDIN> for user interaction.


12. Guess my number! Use <STDIN> for user interaction.


13. Typo-generator I: skip letter when typing 'Reinier'  


14. Typo-generator II: double letters when typing 'Reinier' 


15. Typo-generator III: reverse letters when typing 'Reinier'  


16. Which name is a palindrome (Sebastian, Daniel, Florence, Hannah, Kirsten, Bibian, Niki, Elle, Reinier)?  


17. Combine two lists by alternating take elements, e.g. ('a', 'b', 'c'), (1, 2, 3) -> ('a', 1, 'b', 2, 'c', 3)  


18. Return a number as a list of its digits, e.g. 1234 -> (1, 2, 3, 4)  


19. Translate a sentence into Pig Latin, e.g. to be or not be -> otay ebay oryay otnay otay ebay  


20. Find the sum of the values of characters of a string where a..z equals 1..26 (Latin alphabet, lower case)  


21. Are the number of x characters equal to y characters in strings like xxxyyy and yyyyxxx?  


22. Given integer N; how many loops to summing up its digits until a single digit number?  


23. Is a word an isogram (= no letters repeated)?


24. Is a word a tautonym (= word formed by repeating a sequence of letters)?


25. Contains a word only piano notes (= a b c d e f g)?


26. do these two words contain the same characters?


27. Duplicate one or more times only the vowels of a word.


28. Count letters and digits in a string.


29. Calculate the sum of odd numbers > 10 and less or equal than 30  


30. Calculate the sum of numbers in an array with numbers 2, 3, -1, 5, 7, 9, 10, 15, 95  


31. Filter an array with numbers and return an array with only positive numbers  


32. Reverse an array  


33. Reverse a string  


34. Determine the number of words in a text  


35. Given numbers 0..9. Calculate the sum of the current number and the previous number.  


36. Check if the first and the last number of a list are the same.  


37. Arrange string characters such that lowercase letters come first.  


38. Extract all digits from string.  


39. How to add a number to all letters in a string using regex?  


40. How to add a dot to all letters in a string using regex?  


41. Replace each special symbol with # in a string using regex.  


42. Replace in the string 'abcde' the first character with the last and vice versa.  


43. Concatenate two strings except for their first characters.  


44. Concatenate two strings except for their last characters.  


45. Apply a Caesar cipher with a shift of 4 to the right for the string 'REINIER'  


46. Do a circular shift on an array.  


47. Uppercase the letters 'a c d e i j' in the string 'abcdefhijk'. Don't use concatenation.  


48. Add the element 'Reinier' at the beginning of the array @names that contains the elements 'Sebastian Daniel Florence' and print the new array length.  


49. Remove the last element of the array @names that contains the elements 'Reinier Sebastian Daniel Florence' and print the removed element.  


50. Given the string "abc def ghi". Check if there is a match between the string and the substrings "abc" :-), "def" and "xyz". Stop searching if a match is found! Print the result. Find a short solution without using a function.  


51. Make a few simple math tasks (with +, -, * and \) with some fake answers (e.g. 1 + 1 = 3). Check if the answer is correct or not. Do not use the unsafe function 'eval'.  


52. Write a function that paints a right-angled triangle OAB where OA = OB, represented by dots.  


53. Check if a time string is in a correct English time format.