Draw a flow-chart and Write a program that asks the user to enter students grades. The program should stop reading when the use enters ‘*’. In addition, your program should print the number of students got each grade. The grades can be A, B, C, D, and F. You should check for both upper and lower case letters. Your program should check for any invalid input other than ‘*’ and print appropriate message.

To solve this problem, you can use a loop to repeatedly ask the user for grades until they enter '*'. Within the loop, you can increment counters for each grade category. Finally, you can print the number of students for each grade.

Here's a flowchart that represents the steps required for this program:

```
+-------+
| Start |
+-------+
|
V
+---------------+
| Read a grade |
+---------------+
|
V
+-------------+
| Check input |
+-------------+
|
V
+-----------+
| is grade |
| '*' |
+-----------+
/ \
/ \
V X
+------+ +---------+
| Stop | | Invalid |
+------+ | input |
+---------+
```

Based on this flowchart, here's a Python program that solves the problem:

```python
# Initialize counters for each grade category
grade_A, grade_B, grade_C, grade_D, grade_F = 0, 0, 0, 0, 0

# Start the loop
while True:
# Read a grade from the user
grade = input("Enter a grade ('*' to stop): ")

# Check if the input is '*'
if grade == '*':
break

# Convert grade to uppercase for case-insensitive comparison
grade = grade.upper()

# Check if the input is a valid grade
if grade in ['A', 'B', 'C', 'D', 'F']:
# Increment the respective grade counter
if grade == 'A':
grade_A += 1
elif grade == 'B':
grade_B += 1
elif grade == 'C':
grade_C += 1
elif grade == 'D':
grade_D += 1
elif grade == 'F':
grade_F += 1
else:
print("Invalid input. Please enter a valid grade (A, B, C, D, F or '*').")

# Print the number of students for each grade
print(f"A: {grade_A}")
print(f"B: {grade_B}")
print(f"C: {grade_C}")
print(f"D: {grade_D}")
print(f"F: {grade_F}")
```

This program prompts the user to enter grades and stores the count for each grade category. It then checks for invalid input, breaks the loop if the user enters '*', and finally prints the count for each grade category.