@ampthill If you just need them to upload their assignment (i.e. you don’t need them to use the chat & meetings features of Teams) then the external user can be granted access to a specific folder via Sharepoint (FYI, Sharepoint is the file storage for your Teams content).
Let’s assume you have a channel (& therefore a Sharepoint folder) already set up for the purpose of holding the uploaded assignments, open this folder in Sharepoint (you should have an “open in Sharepoint” button in Teams), then click to highlight the specific folder in Sharepoint and click the share icon to share the folder, enter the user’s email address, it may default to Read Only, type in a comment if you like and send the invitation to the user. They will probably be asked to prove they are who they say they are by an authentication link being sent to their email.
All this assumes your Admin has turned on external sharing on the Team/Group. There are other settings to control what the user can do, i.e. disable downloads. But this might work if you just want to give them a place to upload files. Once uploaded you can use the “move to” feature to put the file into a different folder.
We also use Guest accounts, basically we allow users with external email addresses to be added to a Team, there’s a policy and agreement they need to sign up to but I’m not too sure how it works in detail I’m afraid.