swift

Swift 4 for-in loop Tutorial with Example

For-in loop is used to iterate over sequence like array, dictionary, string etc. In this example, I will show you use of for-in loop with different examples.Drop a comment if you have any queries.

Read
swift

Swift switch tutorial with Example

Switch statement takes a value and compare it with different cases. If any case matches, it runs a block of code. It is like using multiple 'if' conditions and checking each of them one by one. A switch statement can be defined as below :.

Read
java

Java program to find Harshad or Niven number from 1 to 100

This tutorial is to find Harshad or Niven number in Java. A Harshad or number or even number is a number that is divisible by its digits.

Read
java

Java program to find Saddle point of a Matrix

In this tutorial, we will learn how to find the saddle point of a matrix in Java. I will give you two examples. Try to run the program with different examples and let me know if you have any query.

Read
java

Java Program to convert decimal to Hexadecimal

In this tutorial, I will show you how to convert a decimal number to Hexadecimal in Java using two different methods.

Read
swift

Swift 4 Tutorial : Dictionary

Dictionaries are Collection that store key-value paired items.The values are of same type and all items are stored without any order. You can access any item using its key. It is not required that the keys should be a number always. All the keys should be of the same type and unique.A dictionary can be variable or constant in swift.

Read
java

Find ASCII value of a Character in Java

ASCII or American Standard Code for Information Interchange is a character encoding standard to represent characters in computers. By using a 7-bit binary number, a character is defined.

Read
python

Write a python program to find the number of CPU count

Using python, we can easily check the number of CPUs available in a system. In this example program, we will learn two different methods to get this count.

Read
swift

Swift Set tutorial : Create, access, modify and iterating a Set

Previously we have discussed about arrays in swift. Similar to array, set is another collection data type in swift. The main difference is that the elements in a set are unordered and it contain only unique elements. In this tutorial, we will show you how to create a set and different set operations :.

Read
python

What is Docstring and how to write docsrting in python

A docstring is a string that is used for documentation of a module,function,class or method in python. This string comes as the first statement after the name of the function , module etc . The value of a docstring can be printed out by using doc attribute of the object. So, if you want to know what a system module does, just print out its docstring. e.g. to know about 'int', use the following :.

Read