How to Program for Beginners Ep.1: How to Make an Artificial Inteligence




First of all your going to need to download the latest version of Python

Here is some information about python:

Python is a 25 year old coding language, it is widely known as the easiest code language, the difficulty can go from beginner to advanced, python has many features such as the python turtle and a python workplace named pycharm and is a mainly text based coding language.


  • The latest version of Python
  • At least notepad or notepad++ (but preferably pycharm)
  • A basic knowledge of coding
  • A good atitude

Here is where we get into the technical part

Step 1: Imports

Before anything else you want to write

import random 
import sys 
import os

Step 2: Welcome Message

Now you want to add the welcome message that looks something like this:

print("Welcome How Can I Help You")

Step 3: Input and Question

what you want to do is type:

Q1 = input()
if Q1 == "This is where you place the question":
   print("This is where you place the answer")
if Q1 == "This is where you place the question"
   print("This is where you place the answer")

So its basically saying if the question is this say this; so every time you want to add a question just type another if. Sorry if you don't understand, if this is to hard I recommend going to code academy.

Step 4: Thats Pretty Much It

Okay so with that you will probably be ready to make it. Oh and I forgot you want to save it as a .py file.

I left out the else: command because it isn't very reliable.

I would just like to give a shout out to Troy (tomatoskins) for hooking me up with a free pro membership.

I love all of you guys who take the time out of your day to watch my tutorials it really helps out and I appreciate it a lot.





    • Arduino Contest 2019

      Arduino Contest 2019
    • Trash to Treasure

      Trash to Treasure
    • Tape Contest

      Tape Contest



    2 years ago

    This isn't exactly AI as it just answers predefined questions, I would suggest renaming it to "making a Q&A". Otherwise a program adding two numbers would probably count as advanced AI since it can automatically answer a huge number of questions. Even a text-based RPG doesn't have AI as the computer doesn't have to adapt to vague or new conditions but rather responds to a very finite set of choices. In short, you're making us programmers look bad by making AI look like child's play, keep our public image high - it's your image too after all ;)

    Also, I would suggest you add a note on how to run this, chances are Python will handle execution with the renaming, if not, you'll have to run Python in the cmd, I don't remember which one it is for Python.

    Also mention Python in the title, it's catchy and will prepare people for what's coming (i.e. it's not for Android, or for iOS, or anything else one may assume).

    Wikipedia's article on AI :

    "Major AI researchers and textbooks define this field as "the study and design of intelligent agents", in which an intelligent agent is a system that perceives its environment and takes actions that maximize its chances of success."