I need to create a program that has (at least) two variables, char and num. I need to use nested loops to print char, a character, in the form of the following pattern on as many lines and as many times as specified by num. For example, if char is “M” and num is 5, then the program will draw the following pattern:

M
MM
MMM
MMMM
MMMMM

To create a program that prints the pattern you described, you need to use nested loops. One loop will control the number of lines to be printed (based on the value of `num`), and the other loop will handle printing the character (`char`) on each line.

Here's an example of how you can accomplish this in Python:

```python
char = "M"
num = 5

for i in range(1, num+1):
line = ""
for j in range(i):
line += char
print(line)
```

Let's break down the code:

- The outer loop `for i in range(1, num+1):` iterates `num` times, starting from 1 and ending at `num`. This controls the number of lines to be printed.
- Inside the outer loop, we initialize an empty string `line = ""`.
- The inner loop `for j in range(i):` iterates `i` times, which increases with each iteration of the outer loop. This controls the number of characters to be printed on each line.
- Inside the inner loop, we concatenate the `char` to the `line` string: `line += char`.
- After the inner loop is finished, we print the `line` string for each iteration of the outer loop.

By running this code with `char = "M"` and `num = 5`, you will get the desired pattern:

```
M
MM
MMM
MMMM
MMMMM
```

Feel free to modify the values of `char` and `num` to generate different patterns.