Below are some basic coding problems. If you have never coded before these are good problems to start off with.
Keep things simple, everything should be console based.
- Write a program that prints ‘Hello World’ to the screen.
- Write a program that asks the user for their name and greets them with their name.
- Write a program that asks the user for their name and only greets you if you are Alice or Bob.
- Write a program that asks the user for a number n and prints the sum of the numbers 1 to n
- Write a program that asks the user for a number n and prints the sum of the numbers 1 to n if the number is a multiple of three or five, e.g. 3, 5, 6, 9, 10, 12, 15 for n=17
- Write a program that asks the user for a number n and gives them the possibility to choose between computing the sum and computing the product of 1,…,n.
- Write a program that prints a multiplication table for numbers up to 12.
- Write a guessing game where the user has to guess a secret number. After every guess the program tells the user whether their number was too large or too small. At the end the number of tries needed should be printed. It counts only as one try if they input the same number multiple times consecutively.
- Write a program that prints the next 20 leap years.
References
https://adriann.github.io/programming_problems.html