Chapter 3: Programming Courseworks

Programming coursework

face Josiah Wang Tom Crossland

Inside your exercise repo you should find two files:

greet.cpp
greet.py

If you are in MSc AI or MRes AI&ML, run the following inside the repo directory:

python greet.py

If you are in MSc Computing, run the following inside the repo directory:

g++ greet.cpp -o greet.out
./greet.out

In both cases, you should see I like Imperial printed to the output.

Exercise 6

  1. Open greet.py (for MSc AI) or greet.cpp (for MSc Computing).
  2. Change the text in the code from "I like Imperial" to "I love Imperial"
  3. Run your code again (or compile and run for MSc Computing), and check that the output has changed!