How to code for this Python program? Please tell me

??? how to code in python 3

Unfortunately, we can’t give away answers on the forums, especially as this seem to be homework . Codecademy does a very good lesson on files: ->this<- lesson (it is from the Python 2 course, so it’s free).