Command Line Interface (CLI)
00:10 It’s going to be coded across the three platforms we’re looking at here, so you’ll see it coded for the command line, a desktop GUI, and for the web. Let’s take a look at the application being programmed for the command line. Here, you’re going to see the application programmed for the command-line interface.
This is a really simple program and exactly the kind of thing you would have done early on in your Python career. Starting off with a simple heading, and then inputting
a and casting it to an integer.
00:54 So, this is a very simple piece of code and there is no error checking in it. Now, the point of this demonstration isn’t to produce a perfectly robust application, but to demonstrate the difference in coding which is needed to get up and running on each platform, so that’s why there’s no error and type checking on any of these.
As you can see, a simple interface for the user and
2 + 4 does indeed equal
6. In reviewing the code that was written, you can see that, really, it’s only four lines of functional code with an extra one added for the heading at the beginning.
Become a Member to join the conversation.