Kotlin program to access a character in a string by index

This kotlin program is to show you how we can access a character in a string using index position. The program will take one string as input from the user. Next, it will take the index position. The output of the program will be the character at that user defined index position in the string.We will learn two different ways to solve this program.

Read

Python program to remove all duplicate elements from a list

In this tutorial, we will learn how to remove all duplicate items from a list and create a new list by removing all duplicate items.

Read

Kotlin program to print each character of a string (4 different ways)

In this kotlin programming tutorial, we will learn how to print each character of a string in kotlin. The program will take the string as input from the user and print out all characters of it one by one.

Read

How to clone or copy a Vector in Java

In this tutorial, we will learn how to clone or copy a vector object in Java. The program will take user inputs to create one vector and then it will clone the vector to a different variable.

Read

Kotlin program to reverse a string recursively

In this kotlin programming tutorial, we will learn how to reverse a string recursively in kotlin. The program will take the string from the user and reverse it.We will use one separate method and call it recursively to reverse the string.

Read

How to check if a number is positive, negative or zero in Kotlin

In this Kotlin programming tutorial, we will learn how to check if a number is positive, negative or zero in Kotlin. We will implement this program with a when block.

Read

C program to check if a number is in a range with one line

In this C programming tutorial, we will learn how to check if a number is in a range or not using only one comparison line. The program will take all inputs from the user (number, lower range and upper range) and check if it lies in the range.We will also use one different function to test it. That will make the program more readable. Let's take a look at the program.

Read

Write a python program to reverse a number

This is one of the most common questions asked in a Junior level programming interview. I have not found any real project that requires to reverse a number. Maybe if you are implementing some kind of logic or puzzle games, this program will come in handy.

Read

Python program to calculate simple interest

Python examples to calculate simple interest with user-given values in two ways. We will learn how to solve this by using a separate function and without using a function.

Read

Python example program to split a string at linebreak using splitlines

Line split or string split is one of the most common problems we faced in our development journey. For example, the server is sending us a list of comma separated values and we need to split all the values and put them in a list. The easiest way to solve this problem is to split the string.

Read