Of course not. There's a contract between you and the person that wrote the Nand gate that says that the two inputs are named 'a' and 'b' and the output is named 'out'. If either you or the person that wrote the Nand gate part decide to break the contract by using a different name for one of the ports, it's not going to be surprising that things don't work.
So, what is the contract between the user of the Not gate part (i.e., the test script) and the writer of the Not gate part (i.e., you)?
This is why the authors gave you templates for every part they are asking you to create that satisfy the contract for that part.
A Nand gate has two inputs. You've connected one of them. What about the other one? The simulator isn't a mind reader, so it doesn't know what your intentions are. Whoever wrote the simulator has to decide what to do in this case and there are a number of options. Throw an error? Assume that the input is tied to a specific level, such as LO? Assume that the input is tied to a default level that makes sense for that part?
Don't give the person that wrote the simulator that kind of power over your design. YOU decide what you want each input to be and then make it so.