## Creating your own function: Predict the output of the following commands.

```
function_math <- function(x, y){
z <- x + y
p <- x * y
q <- z / p
return(c(z, p, q))
}
function_math(2, 3)
```

## R Functions: Do you ever wonder how your Discussion Forum points are calculated based on your activity in the forum?

Let’s try to understand the interesting analytics behind it.

Two active members A and B always try to answer as many questions as possible on the forum. On the last 6 common questions which both of them answered on the forum, they received few upvotes which are recorded as vectors as given below:

A_upvotes <- c(7, 3, 2, 8, 0, 4)

B_upvotes <- c(2, 1, 3, 4, 2, 4)

## R Loops: Do you ever wonder how your Discussion Forum points are calculated based on your activity in the forum?

Let’s try to understand the interesting analytics behind it.

Two active members A and B always try to answer as many questions as possible on the forum. On the last 6 common questions which both of them answered on the forum, they received few upvotes which are recorded as vectors as given below:

A_upvotes <- c(7, 3, 2, 8, 0, 4)

B_upvotes <- c(2, 1, 3, 4, 2, 4)

Answer the following questions to find out how badges are given to different participants based on data obtained from activities in the discussion forum.

## Do you ever wonder how your Discussion Forum points are calculated based on your activity in the forum?

Let’s try to understand the interesting analytics behind it.

Two active members A and B always try to answer as many questions as possible on the forum. On the last 6 common questions which both of them answered on the forum, they received few upvotes which are recorded as vectors as given below:

A_upvotes <- c(7, 3, 2, 8, 0, 4)

B_upvotes <- c(2, 1, 3, 4, 2, 4)

The following questions will help you understand how answer upvotes’ data can be analysed.