I have to write a program illustrating how the Monty Hall Problem works, which I will write below. I have a poor teacher, so i have very basic programming knowledge. Any help is appreciated!

You are to write two programs.
Code:
The First Program
The first program will act as the game host that continuously hosts this game and the user of the program
will act as the player.
The program will loop over the playing of this game. In every game, the doors are labelled by 1, 2, and 3 respectively. A game begins by putting the prize behind a door at random, then prompts the user to pick a number from {1;2;3}, which indicates the door the user picks.
The program then decides a door to open. The door must be one behind which there is no prize and which is not picked by the user. In case there are two such doors available, the program picks one at random.
The program next prompts the user to decide if he wants to switch. Based on the user's decision, the program outputs if the user won the prize or not. 
The loop over game plays finishes if the user picks an invalid door number (a number outside {1;2;3}) at the beginning of the game. When the loop is over, the program outputs the total number of games that have been played, the number of games in which the user has won, and the relative frequency of winning.

The Second Program
The second program simulates the playing of the games by two specific users. The first user consistently decides on "switch" and the second user consistently decides on "not switch". For each user, 10000 game plays will be simulated, and in each game, the initial pick by the user is made random. The program may not print some intermediate results indicating the progress of the program, but in the end it must
print how many games each user has won and the winning frequencies for each user.