take() method is defined in Kotlin standard library. This method can be used with an array or iterable. In this tutorial, we will learn how to use take method in kotlin with example. The program will show you how take works on arrays with a different data type.
ReadIn this python programming tutorial, we will learn how to find the difference between two sets. The difference between set A and set B is a set that contains only the elements from set A those are not in set B. In this example, we will take the inputs from the user for both sets. The program will calculate the difference and print it out.
ReadSometimes we need to compare two substrings in different string in Java. We can do that by comparing each character one by one of both strings but Java String class comes with a built-in method called regionMatches to make this task easier.
ReadIn this C programming tutorial, we will learn how to count the odd and even numbers in an array. The program will populate the array taking inputs from the user and it will print out the even and odd count.
Readperror method of C comes in handy if you want to print an error message to the user. It shows the most recent error that was occurred before the function was called. Basically, it prints one error message to stderr. This function is defined as below :.
ReadKotlin standard library comes with a lot of different functions derived under different packages. For example, if we want to find out the largest of two or three numbers in Kotlin, we can either write our own comparison function or use the one that is provided under the standard library.
ReadIn this python programming tutorial, we will learn how to convert a kilometer value to miles. The program will take the kilometer input from the user, convert it and print out the result.
ReadIn this python programming tutorial, we will learn how to find out the perimeter of a triangle using user-provided values. The program will take the inputs from the user and print out the result.
ReadThis post will show you three different ways to find the largest divisor of a number in Python. We will learn how to use a for loop or how to use the next() function to calculate the largest divisor with examples.
ReadPython program to find the factors of a number. The program will take one number as the input from user and print out the factors for that number.
Read