the addition (+) operator is used for addition of two number.

```
main = do
let var1 = 7
let var2 = 3
putStrLn "The addition of the two numbers is:"
print(var1 + var2)
// output is
10
```

Subtraction operator is used for subtraction operation between two number.

```
main = do
let var1 = 7
let var2 = 3
putStrLn "The subtraction of the two numbers is:"
print(var1 - var2)
// output is
4
```

Multiplication Operator is used for multiplying a number with other numbers

```
main = do
let var1 = 7
let var2 = 3
putStrLn "The multiplication of the two numbers is:"
print(var1 * var2)
// output is
21
```

Division Operator is used for dividing a number and provide result

```
main = do
let var1 = 6
let var2 = 3
putStrLn "The Division of the Two Numbers is:"
print(var1/var2)
//output
2.0
```

There is no modulo (%) operator in haskell, but we have function for it

Returns the quotient of the two numbers. This is the result of division which is then truncated towards zero.

```
ghci> 6 `quot` 3
2
ghci> 7 `quot` 3
2
ghci>
ghci> 7 `quot` 80
0
ghci>
```

Returns the remainder from the quotient.

```
ghci> 6 `rem` 3
0
ghci> 7 `rem` 2
1
ghci> 7 `rem` 4
3
ghci>
```

Similar to "quot", but is rounded down towards minus infinity.

```
ghci> 6 `div` 6
1
ghci> 6 `div` 2
3
ghci> 6 `div` 4
1
ghci>
```

Returns the modulus of the two numbers. This is similar to the remainder, but has different rules when "div" returns a negative number.

```
ghci> 4 `mod` 2
0
ghci> 7 `mod` 2
1
ghci> 7 `mod` 4
3
ghci>
```

Below are three "raise to the power" operators which work differently and take different argument types.

Takes two floating point numbers and uses logarithms to compute the power. It can also be used with integers but result will be in Floating point number. Even though it squares the number but it will not change the sign(+ or - of the number

```
ghci> 3 ** 2
9.0
ghci> 4 ** 4
256.0
ghci> 10 ** 3
1000.0
ghci>
ghci> -4 ** 2
-16.0
ghci>
```

Takes a fractional number (i.e. a floating point or a ratio, of which more later) and raises it to a positive or negative integer power.

```
```

Takes any numerical type and raises it to a positive integer power.

Above two did not work for me

Numbers, characters and strings can be compared using the usual comparison operators to produce a Bool value

Compares given two value and results `True`

if __both value are same__ otherwise `False`

```
ghci> 9 == 9
True
ghci> 9 == 7
False
ghci>
```

Compares given two value and results `True`

if __both value are not same__ otherwise false

```
ghci> 9 /= 7
True
ghci> 9 /= 9
False
ghci>
```

Compares the two given value and results `True`

if the __left side value is lesser than right side value__ otherwise result in `False`

```
ghci> 9 < 4
False
ghci> 9 < 35
True
ghci>
```

Compares the two given value and results `True`

if the __left side value is Greater than right side value__ otherwise result in `False`

```
ghci> 9 > 3
True
ghci> 9 > 56
False
ghci>
```

Compares two values and if the __left side value is lesser or equal to the right side value__ then results `True`

otherwise `False`

```
ghci> 9 <= 78
True
ghci> 9 <= 9
True
ghci> 9 <= 5
False
ghci>
```

Compares two values and if the __left side value is greater or equal to the right side value__ then results `True`

otherwise `False`

```
ghci> 9 >= 5
True
ghci> 9 >= 9
True
ghci> 9 >= 67
False
ghci>
```

Sequence or Range is a special operator in Haskell. It is denoted by "(..)". You can use this operator while declaring a list with a sequence of values.

`..`

Operator generates the interval between the given numbers. if you want to print or generate a list containing 1 to 100 number you can simply use like below.

```
ghci> [1..30]
[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]
ghci>
```

I same way you can generate the characters as well buy mentioning the from and to alphabet. The list will be generated based on the ASCII values.

```
['a'..'z']
"abcdefghijklmnopqrstuvwxyz"
ghci>
ghci> ['B'..'Z']
"BCDEFGHIJKLMNOPQRSTUVWXYZ"
ghci>
ghci> ['A'..'z']
"ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz"
ghci>
```

```
ghci> [10..0]
[]
ghci>
ghci> ['a'..'Z']
""
ghci>
```

Myself KarthiQ, I am the author of this blog, I know ways to write a good article but some how I donot have the skills to make it to reach people, would you like help me to reach more people By sharing this Article in the social media.

You can attend first 3 classes for free, the total

The course time would be 8.00 PM(IST) for the first three classes

The course time would be 8.00 PM(IST) for the first three classes

If you are interested to learn then you can join the course by sending email to

| |||||