Valentina Milanova of Daye On 5 Things We Need To Do To Close The VC Gender and Racial Gap

As part of my series about “the five things we need to do to close the VC gender and racial gap” I had the pleasure of interviewing Valentina Milanova. Valentina Milanova, Founder of Daye, a…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




INTRODUCTION TO PYTHON

>Basics (indentation and variables).

Python is a widely used general-purpose, high level programming language. It was created by Guido van Rossum in 1991 and further developed by the Python Software Foundation. It was designed with an emphasis on code readability, and its syntax allows programmers to express their concepts in fewer lines of code.

They are different versions of python i.e. python 2 , python 3 and so on.. After downloading and getting your python interpreter , then we write programs. Python application has a lot of advantages. Enough of the stories , we move to the basics.

In python lots of keywords are used like print , input , import , else , if , elif , while , int ,break , == , and , not , and many more. Python syntax can be executed by writing directly in the Command Line:

>>>print(‘hello, world!’)

when this is run , the reply will be hello world! , try it yourself.

Remember when ever you type in any word in the keyword use a ‘ ’ or “ ”. Numbers don’t need it.

Try printing out your number and class.

variables are names for storing data.

Take note: It must not start with a number ,only letters\ alpha numeric characters and underscore character alone.

It is case sensitive.

Doesn’t need ( ) or ‘ ’. Example of variables are :

x=

carname=

variables are written in cases like Camel -(each word except the first starts with a capital letter) e.g myVariableName ,

Pascal (each word starts with a capital letter) e.g MyVariableName.

Indentation refers to the spaces at the beginning of a code line.

Where in other programming languages the indentation in code is for readability only, the indentation in Python is very important.

Python uses indentation to indicate a block of code.

Example:

if 5 > 2 :

# you should leave one space before you type print in the next line.

print(‘five is greater than two’)

when you run this , you get five greater than two.

BUT IF YOU DONT ADD THE SPACE ,YOU WILL GET AN ERROR.. TRY IT!!!

NUMBER OF SPACES HAS TO BE THE SAME IN THE SAME BLOCK OF CODES .

TRY USING THE EXAMPLE ABOVE TWICE ,USING ADDITIONAL NUMBER OF SPACING TO THE SECOND TEXT.

This are unexecutable line of code. It starts with an # ,whenever # is used/run it will be ignored.

E.g print(‘i am bola’)

#this is her name.

when you run it ,you will notice only i am bola will show the #text will not show.

SO PEOPLE THAT WILL BE ALL FOR NOW!! STAY TUNED FOR MORE.

PRACTICE MORE ON VARIABLES AND USING INDENTATION.

Add a comment

Related posts:

Capture your users attention with style

Do you manage UNIX machines that are logged into by multiple users? If so, this scenario will be familiar to you: you need to communicate something to your users — a maintenance window, modifications…

The Path Well Trodden

The claws were deep and my heart bled. Distant echoes that I think I hear; Repeating in each place, each time. Like a horrible, unfinished pattern on a quilt made over years. I couldn’t go then…

Why you need a coach

About two and a half years ago, I was at a point in my life where I knew that I needed a huge, pardon my french, kick in the ass. I was recently divorced, my girlfriend at the time had just left me…