22 coding problems for beginner QA engineers - Basics


Hi Reader,

Good day, hope you're doing well.

If you an QA Engineer who is beginner in coding,

practice the below 22 coding problems on Basics - Numbers and Conditions, Loops.

There are further topics on Arrays, String, Collections which I will share in another email.

You can search for solutions on YouTube, Google, ChatGPT, Gemini tools.

The focus should be on practice in Coding Editor (Eclipse IDE or IntelliJ) and understanding the logic, not memorizing the actual code.

During Interviews how you explain the solution and your approach will help you crack the interview rounds.

I have explained similar problems solving on my YouTube channel playlists (Swaroop Nadella) and Udemy courses (Access on Udemy Business employer login for free). Explore them for learning programming fundamentals first.

Coding Problems on Basics - Numbers and Conditions

1) Check whether a number is even or odd

2) Find the largest of three numbers

3) Check whether a number is divisible by 5

4) Check whether a number is divisible by 3 and 7

5) Check whether a year is a leap year

6) Check whether a person is eligible to vote

7) Check whether a number is a prime number

8) Assign grade based on marks (simple if–else)

Coding Problems on Loops for Logic building

- Here N you can take any number like 10 or 50 or 100

9) Print all even numbers between 1 and N

10) Print all odd numbers between 1 and N

11) Calculate the sum of numbers from 1 to N

12) Calculate the sum of even numbers from 1 to N

13) Calculate the sum of odd numbers from 1 to N

14) Count the number of digits in a number

15) Reverse a given number

16) Calculate the factorial of a number

17) Count how many even numbers exist between 1 and N

18) Count how many odd numbers exist between 1 and N

19) Find the sum of digits of a number

20) Print prime numbers between 1 and N

21) Star patterns

22) Number patterns

Don't think these are simple, only with regular practice you will gain hands-on experience, to solve these.

It would be asked in many service-based companies in different ways for QA automation interviews.

If you had completed solving these, Publish to your GitHub profile.

Write on LinkedIn post about completing this Basics coding problems challenge and tag me.

Let's see how many folks would complete this, if you are a beginner in coding. Get Started today!

Let's meet in next email

- Swaroop Nadella | LinkedIn

P.S. I’ll keep sharing short, practical information often in this email newsletter - no spam, only things that help you as a QA engineer.

You can read my previous email articles published here.

Swaroop Nadella

I'm a Software Tester, Test Automation Engineer with 13+ years of Experience and Tech YouTuber who loves to share knowledge with Software Testers. No Spam, Unsubscribe anytime.

Read more from Swaroop Nadella

Hi Reader, Hope you’re doing well! So far, we’ve covered Numbers, Loops, and Arrays in previous articles. Now it’s time to move to one of the most important topics for QA automation interviews - Strings. In real projects, you constantly work with text data: Usernames and passwords API responses Error messages Validation messages Logs That’s why strong string-handling skills are essential for any QA engineer who wants to move into automation. Below are 12 string coding problems arranged from...

Hi Reader, Hope you’re doing well! Last week, I shared 22 basic coding problems on Numbers and Loops. If you’ve been practicing them, that’s awesome. If not, don’t worry - take it at your own pace. The goal is to understand the logic, not rush through. Now, if you’re comfortable with loops, it’s time to level up a bit: Arrays. Arrays help you move from working with single numbers to handling multiple values at once. This is exactly the kind of thinking that comes up in QA automation...

Hi Reader, Happy New Year 2026. I am probably late to share the New Year wishes to the folks on my email newsletter, today I got some free time being a holiday. I will try to write more often in 2026, once or twice a week. One QA engineer replied to my welcome email and said: “I need to learn how to find correct and different use cases from the requirement.” Honestly, this is something almost every QA engineer struggles with at some point. Not because testing is hard.But because requirements...