Java program to find a random value in an array in 4 different ways. We will use java.Math, java.util.Random, java.util.concurrent.ThreadLocalRandom and SecureRandom to find a random value in an array.
ReadHow to check if a year is leap year or not in Java. We will also learn how to print all leap years in a given range of years.
ReadDifferent Java programs to find the factorial of a number. Learn how to do it by using a for loop, while loop, do-while loop and recursively.
ReadPython program to extract emails from a file. It will take the file path as input and return a list of all emails found in that file.
ReadPython program to find duplicate words in a file. We will learn how to do it in two different ways, by using set and by using a dictionary.
ReadPython program to read and write the content of a file in backward. It will read the content of a file in backward and write that content to a different file.
ReadPython program to sort the lines of a text file alphabetically. This program will sort the lines of the file in ascending order and write it to another file.
ReadC program to find the sum of digits of a given number. We will learn 3 different ways to solve it- by using a while loop, with a for loop and by using a recursive method.
ReadC program to find the first and last digits of a number. We will learn how to do that by using a loop and with log and math functions.
ReadC program to print the natural numbers in reverse order. We will learn how to do it in different ways by using a while loop, using a do-while loop, using a for loop and also how to print the natural numbers in a range.
Read