In this tutorial, we will learn python range() function and how to use it using examples. Mainly, range() is used in for loops. It can be defined as below :.
ReadIn this C programming tutorial, we will learn how to convert seconds into hour/minute/second values. The program will take the seconds as input from the user and print out the hour/minute/second conversion.
ReadThis question is asked mostly on C programming interviews. Normally we use one if-else condition to check if a number is greater than another number or not like below :.
ReadIn this tutorial, we will learn how to find a number is Pronic or not. A number is called a Pronic number if it is equal to the product of two consecutive numbers. For example, 7*8 = 56, so 56 is a Pronic number. In this program, we will ask the user to enter a number and then check if it is Pronic or not. Let's take a look at the program :.
ReadIn this tutorial, we will learn how to find if a number is perfect or not by using C programming language. A positive number is called a perfect number if the sum of its proper positive divisors is equal to the number. For example, 6 is a perfect number. Because :Its proper divisors from 1 to 5 are 1, 2, and 3. Sum is 1 + 2 + 3 = 6 which is equal to the number itself. So, it is a perfect number.Let's take a look at the program.
ReadIn this example, we will learn how to convert a list to string. The list is one of the most commonly used datatype in python. List is used to storing a collection of different items. Python list is mutable, ordered and it can also hold duplicate values. In python, list is created by placing all items inside a square bracket ([]). Items are separated by commas. The index of list item starts at 0, i.e. the index of the first element is 0, the index of the second element is 1 etc. We can access any element in a list by using its index. We can also delete or update an element in a list
ReadIn this tutorial, we will learn how to dismiss a keyboard if the user taps on outside on any view. In iOS, the keyboard doesn't dismiss automatically if the user taps anywhere outside of the keyboard view. So, we need to handle it manually. To achieve this, we can simply add one UITapGestureRecognizer to the parent view and dismiss the keyboard if any tap detected. The code looks like as below :.
ReadIn this C programming tutorial, we will learn how to check if a substring exists in a string or not. If the substring exists, the position of this substring in the string should be printed. For example, for the string "Hello World!!", substring World appears on position 7 of the main string. Similarly, if the substring doesn't exist, print one failed message.The user will enter both of these inputs. Before going through the steps, let's take a look at the program first. We are using a recursive approach in the below program :.
ReadLinkedHashMap is hash table and linked list implementation of the Map interface with predictable iteration order. It maintains a doubly linked list through all entries. The iteration order is normally the same order in which the keys are inserted into the map.
ReadPython example program to merge the contents of two lists and sort the merged list. This program takes all inputs from the user.
Read