Please avoid requesting code solutions as per the forum guidelines. Since this a learning environment you’re not getting much out of copy/pasting solutions.
What you should do is attempt the problem and if you should get stuck then you can consider checking the forums. If you need to ask a question that’s not covered elsewhere please check the following FAQ first on how to ask good questions and thereby potentially receive the most helpful answers-
It does however not print anything. Is it because the try&except statements should be included in another function? If so, how exactly should the statements be denoted? I’m unsure about what statements follow ‘try’ and ‘except’.
Can someone help? Merci!
The forums are mainly composed of other learners and you can certainly ask for input here; a new thread under #get-help:python would be the best choice as this thread is old.
As mentioned in the post above (the linked FAQ is an excellent resource) it’s better to actually flesh out an idea before asking questions, a.k.a. try and solve it and come back with what you’ve done and explain what you’re stuck on.
Many folks who answer questions prefer giving hints and pushing you to resolve the issue yourself as it has a tendency to reinforce what you’re learning (getting stuck helps things stick in memory, at least I think it does ). Cheers.