Python basics and simple programs.

Madiwa Simon
2 min readOct 31, 2021

As I said from the previous blog python is a very simple program that can process complex functions or actions that need to be done. For this blog will cover the most basic actions that can be done in python.

Literal is a value of some type. There is numerical literals and string literals.

Numerical literals are numbers and fractions that has any value that involves math or numbers.

String literals are words or letters that are used as string like “Hello World”, ‘this is a string’, and “a lot more that mostly use quotations”.

Functions are named block of code that only runs when it’s called and gives a return value that can be written by us or we can use functions that are already in used in python. like print.

The function print will print out anything you put inside the parenthesis.

For example.

Let us use something with a simple user interaction that will ask for input of the user. for example.

name is a variable that will ask for input of the user. Which is “What is your name?” the user will have to type any input to save in the variable name.

Then the line 4 will print out the greeting variable which is Welcome plus a single space plus the variable name which is inputed by the user.

That is how you create a simple program in python that has user interface.

--

--