Coding improves maths, reasoning, logical & thinking skills, starting at any stage.
Following are the nineteen coding problems for beginners and kids. These challenges are designed in such a way that kids can understand & execute using any coding gaming console, while the beginners can take these as learning challenges and code them using C, C++ or Java language.
Let’s start with some basic, easy programming problems for beginners & kids.
Challenge 1 Print your name and address
Print your name, address, city and country in “Postal address” format.
Challenge 2 Addition of birth date figures
You have three components in your birthdate. Date, Month and Year. Do a total of these 3 components and print the answer along with label “Date total:”.
For example if your date of birth is 30th of January 2020 (Which is Havi.co’s birthdate 🙂
Then add 30, 1 and 2020. The answer will be 2051. Print this in following format.
You need to do the sum within the program itself. Don’t do the total outside and bring the number in the code.
Challenge 3 Print the numbers 1 to 20
Print the number 1 to 20, each to be in a new line like following.
You can use the print command only once.
Challenge 4 Take date as user input and then return the total as output
So this challenge refers back to challenge 2 where you did a total of all three components of the birth date. You entered the components within the program however.
This time, let’s edit the program in a way so it asks the user to input the 3 components i.e. date, month and year.
You can do the total of the birth date components entered by the user.
Challenge 5 Hours to minutes
In this challenge we will ask the user the enter the number of hours. For example they enter 3.
The program should convert the hours to minutes and display as output.
Challenge 6 Validate the date
This challenge is an alteration of challenge 4. You asked user to enter the date components in that.
What if a user enters 35 as date or 18 into month? That’s not valid, right? So you need to check and validate the values entered by the user. Process the date total only if user has entered valid values into each date component.
Product should also consider the number of days into each month while validating.
Challenge 7 Designing Mario Pyramid
You must have seen this Pyramid pattern if you have played the Mario game.
You can first try preparing the pattern, first on the graph/grid paper. Place the dots at appropriate locations. That will help you prepare the algorithm well.
Challenge 8 Your weight (Mass, scientifically) on different planets and the sun.
Are you of 41 KG? That’s on the earth. If you go out on a different planet you weight will change, without even loosing them. Following is the matrix of relative surface gravity of all the planets. Relative means they are relative to earth. All you need to do is multiply your weight with gravity figure of the particular planet and you get your weight on that planet.
And then write a program that asks user for their weight and then displays their weight on different planets and the sun.
Challenge 9 Calculator
Prepare a program for a basic calculator
1) Ask user for the operation they want to perform out of + – * and /. You can add more operations later.
2) Ask for two numbers to perform the operation on.
3) Display the answer along with the equation.
Use if else ladder and a function too.
Challenge 10 Reverse the number
Write a program that reverses the number entered by the user.
In this program you will first ask user to enter the number. Store the number into a variable and then reverse the number and print as output.
Hint: You will have to use round down, reminder and repeat while commands to solve this problem.
We have prepared a worksheet which will help you understanding the math behind reversing a number. Try this and you will be better able to perform the program then.
Ask the user to enter a number and then check if the given number is even or odd.
Display the result in output.
Challenge 14 Check if the number is positive or negative
Ask the user to enter a number and then check if the given number is positive, negative or zero.
Display the result in output.
Challenge 15 Check if the number is prime or not
Ask the user to enter a number and then check if the given number is prime number or not (a composite number).
A number which can not be divided by any other number except 1 and number itself, is called prime number. For example 19 can not be divided by any numbers other than 1 and 19. Hence 19 is a prime number.
Challenge 16 Find the percentage out of given marks
Ask the user to enter the number of subjects and then ask marks obtained in each of those subjects. Assume eahch the subjects were of 100 marks, can you find the percentage one has got?
Challenge 17 Check if the year is a leap year
Ask the user to enter the year and check if the year is a leap year.
A leap year is the one which can be divided by 4 without and remainder.
Display your output.
Challenge 18 Print Fibonacci series
The Fibonacci series presents the numbers where each number is a sum of 2 immediate previous numbers.
This program should ask user for a number, say X and the program will then print first X numbers of Fibonacci series.
Challenge 19 Calculate factorial
Calculate the factorial of the number entered by the user
Comment down your experience with the programming challenges for kids and beginners.
Liked this article? Share with your friends
If you love to play, perform, or create new things, and you also want your kids to do the same, let us be friends.
[time_change], 6 PM IST, on zoom call.
A class of Technology and future skills for age 5 to 15.
Get an invite
Error: Contact form not found.
Your cart is empty
Thank you for visiting Havi.co
How can we help you?