If it's homework you could get in trouble for it, I wouldn't recommend doing it.
As a side note, as a university student you have to get used to the idea that the main function of your "teachers" is to present the material and answer your questions. Sometimes they are nice and helpful, other times they are entirely useless. It shouldn't matter to you, you have to get comfortable with teaching yourself.
Actually I'm going to ask my teacher tomorrow if she's okay with that so I can be calm about IP.
Make it something personal maybe? Share it with specific individuals and emphasis on modifying your original code. Also talk to the Teacher about your concerns. It's YOUR money that's going the University, if you're not satisfied with the education you're receiving you're well within your rights to bring it up to the higher ups.
>After only if statements and data types she told them to write a calculator.
What more do you need?