Make a Program Using Notepad

Want to start learning a programming language? You don't need any fancy software; Notepad is capable of writing in any programming language. It doesn't offer many options, but is great for quick Batch files or for testing other small programs. You can have a simple program ready in just a minute, though you may want to consider another editor for more complex programs.

Steps

Basics

  1. Write code for any language. Since Notepad is a plain text editor, you can use it to write code for any language, from C to HTML. You can open Notepad from the Accessories folder in your Start menu, or by searching for "notepad".
    • In the sections below, you will find some basic examples for a few different programming languages.
  2. Save the file in the correct format. If you want to use your code in the compiler or interpreter for the language you are programming in, you will need to save the file in the language's format. Click File → Save As. In the "Save as type" drop-down menu, select "All files (*.*)". Enter the extension for the language you are writing.
  3. Consider a more robust editor. While you can certainly write entire programs in Notepad, it's definitely not the easiest way. Notepad doesn't contain any syntax highlighting or indentation options, making it difficult to use for writing larger pieces of code. Consider a program such as Install-Notepad++, which is designed around programming syntax and is also free.

Batch File

  1. Learn basic Batch commands. Notepad is most commonly used to create Batch files. Batch files are programs used to automate functions through the command prompt. You can use batch files to apply changes to a number of files at once, create backup systems, and more.
    • Below are a few basic Batch file examples.
  2. Write a basic backup program. This is a simple program that can backup files from one folder to another, only backing up files that have been modified since the last backup.
  3. Write a batch file to test your network. If you find yourself testing networks and internet connectivity often, this batch file will quickly display the IPConfig and Ping information for you.
  4. Save your file as a BAT file. When writing a Batch file in Notepad, you will want to save it as a .BAT file. This will change the file into a Batch file that can be executed by double-clicking it or running it from the command prompt.
    • Click File → Save As. In the "Save as type" drop-down menu, select "All files (*.*)". Enter the extension ".bat" at the end of the file. When you save it, the file will turn into a Batch file, allowing you to run it.
  5. Create your own Batch files. There is a lot that you can do with Batch files. You can Delay-a-Batch-File, make a program for Make-a-Compressing-Batch-File-in-Computer, Add-a-Password-to-a-.Bat-File, and much more.
    • See this guide for more details on creating Batch files.

Python Program

  1. Learn basic Python scripting. Python is a popular programming language for web scripting, and is one of the easier languages to learn. Python programs don't need to be compiled; you just need the interpreter installed on your system. Most Python programs are run through the command line interface.
    • Below are a few basic Python file examples.
  2. Create a "Hello, World" program. This is one of the easiest programs to create and teaches you the basics of constructing programs in Python. It simply displays the phrase "Hello, World!" on the user's screen.
  3. Print the Fibonacci sequence. This simple program will calculate Fibonacci numbers up to 100. You can change the 100 value in the second line to whatever you'd like to change the number of results you get. Make sure to include the indentations, as that is how Python designates functions.
  4. Run your programs. You do not need to compile Python programs in order to run them. If you have a Python interpreter installed on your system, you can simply run the saved Python file to execute the program. Click File → Save As. In the "Save as type" drop-down menu, select "All files (*.*)". Enter the extension ".py" and save the file. This will allow your Python interpreter to open the file.
  5. Create more Python programs. Even though it's a fairly simple language, Python is very powerful and you can make a lot of useful stuff with it. You can create Create-a-List-in-Python, Create-Loops-in-Python, and Use-Python-Programming-to-Make-Graphing-X/Y-Charts. You can even Program-in-Python-With-Pygame.
    • See this guide for more details on learning the Python language.

C Program

  1. Learn basic C coding. C is one of the older programming languages around, and is the base for many of the more popular languages being used currently, such as C++ and Objective-C.
    • Below are a few basic C file examples.
  2. Create a "Hello, World" program. This is one of the easiest programs to create and teaches you the basics of constructing programs in C. It simply displays the phrase "Hello, World!" on the user's screen. Make sure to include the indentations, as they denote functions.
  3. Create a program that stores user input. Much of what you'll be doing in C involves taking and manipulating user input. This basic program allows you to take a number and store it as a variable, which is the first step towards constructing larger programs.
  4. Compile your programs. C requires a compiler in order to turn the code into a working program. Click File → Save As. In the "Save as type" drop-down menu, select "All files (*.*)". Enter the extension ".c" and then save the file. This will allow you to open it in your compiler.
  5. Create more programs. This is the very tip of the iceberg when it comes to C, which is a very powerful programming language. There is a lot you can do with C programs: you can Compare-Two-Strings-in-C-Programming, Delay-in-C, Create-an-Alert-in-C, and much more.
    • See this guide for more details on programming in C.

Krake Program

  1. Learn Krake. It's probably the most simple language so far out there.
  • Below comes a few examples
  • Print "Hello World" to the screen!
    • As it sounds, it's literally "print Hello World" (without quotes) you type.
  • Print out the contents of a file!
    • Read it first, and save it to a variable,
      then extract the value of the variable and print it.
  • Run the program.
    • Krake doesn't require any compiling. Just save and run it.
  • Create more!
    • As you can see our previous example worked good, but no line breaks. That's because "print" prints HTML4, and we'd need to type "<br />" instead of lines.

    Related Articles