Start by looking at the error message closely - this will help:
How to Write Code to Solve a Problem, A Beginner's Guide Part 2: Syntax Errors[
^]. It's primarily about compilation errors while your problem is a runtime error, but the information the error message is giving you is the same:
java.util.NoSuchElementException: No line found
MyCalculator.main(MyCalculator.java:14)
So it's on line 14 of your code:
14 String mode = scanner.nextLine();
And it's saying "There is no next line".
So look at where the input is coming from:
5 Scanner scanner = new Scanner(System.in);
It's the standard input: so it's either you typing an end-of-file marker, or you are piping a file into the input stream and it runs out of data when you expect to be able to continue.
The first is unlikely: you're working with a file of data, so you either need to look at the data - which we have no access to or any idea what the format is meant to be - or you need to run your code in the debugger to find out exactly where and why it doesn't match what you expected. Probably both would be a good idea!
Sorry, but we can't do that for you - you are going to have to look at your assignment again and check your handling of the data with the debugger.