Skip to main content

The ultimate python cheatsheet for beginners for free


 The Ultimate Python Cheat Sheet for beginners for free 

Hello guys, 

In today's post I am going to give you a complete ultimate python cheat sheet for beginners for free. If you want to get these notes in a pdf then you can comment below. I will create a complete pdf of these notes for you then.

Note: This Cheat Sheet is for python 3.9 but you can follow for each and every version after python 2.


Installation


You cannot run python easily on your computer because to run python programs you have to download the python from a link of its own website called python.org. If you want to install the python then this is the download link for downloading it:-

https://www.python.org/ftp/python/3.9.6/python-3.9.6-amd64.exe 


Boilerplate 


Boilerplate as I early told you that the boilerplate is the common code which is always used in the all the documents which you create in your life but python doesn’t have any this kind of boilerplate code  but many programming languages have this kind of code like c,cpp etc.


Print Statement


The print statement is the vital part of every programming language it is the first step for starting learning a programming language. To use print statement in python you have to use this line:

print(“Hello world”)


Conditional statements


The conditionals are used when your program have some conditions. There are three statements used for conditioning in python: 

  1. If statement → This is the first statement for if-else conditioning. The syntax of if statement is like this:

if(condition):

<!-- This is the inside the if statement →


<!-- This is out of the if statement --> 

----------------------------------------------------------------------------------------------------


  1. Elif condition → This is the second statement for if-else conditioining. The syntax  of elif statement is like the if statement but in place of if there comes elif.like this 

elif(condition):

<!-- This is the inside the elif statement →


<!-- This is out of the if statement --> 

---------------------------------------------------------------------------------------

  1. Else condition → This is the third and last statement for if-else conditioning.The syntax of else statement is like this:

else:

<!-- This is the inside the else statement →


<!-- This is out of the if statement --> 

---------------------------------------------------------------------------------------------------------



Loops in Python 

The loops are used for many things like doing something repeatedly or iterating loops or done to do many other things also there are three types of loops:

  1. For loop

The for loop is the most used loop in python. Its syntax is like this:

for i in range(condition):

# Code here


  1. Do while loop

The do while loop is used when you want that the code you wrote should be excuted once 


  1. While loop

The while loop is used when you have only the condition and nothing else THe syntax of while loop is like this:

while(a>b):

# Code Here


Note: This cheatsheet will be updated everyday.come back tomorrow

Comments

Popular posts from this blog

The Professional HTML Cheatsheet For beginners in 2024 for free

The Professional HTML Cheatsheet For beginners in 2024 for free Hello guys,  You will be glad to know that I am going to start a cheatsheet series for you all. In this series I am going to give you cheat sheets of all the programming languages. If you want to get all of these cheat sheets for free then you can follow this blog and visit my youtube channel if you like the video content. This is the link to my youtube channel :- https://www.youtube.com/channel/UCmbrOCauavTcwIJeXYo4pjQ This is the link to my instagram :- https://instagram.com/gautam9465580 Father of all the links (Link to all of my social media platforms) :- https://code-and-man.blogspot.com/p/my-link-tree.html Now got all the information which I want to give you before the post so now let’s get started with the post:- In today’s post I am going to give you the first cheatsheet which is of HTML so let’s begin:- Boilerplate of HTML The Boilerplate code is the common code which is used in almost all of the web pages c...

Arrays and conversion in Javascript || javascript complete course || #7 (sourcecode)

hey guys how are you all today in this post I am going to give you the source code of my video called arrays and  conversion in JavaScript so let's begin:- // ARRAYS in javascript console . log (" This is arrays in js ") var arr1 = [ 32 , 34 , 23 , 23 , 234 ," this ", {     name:" Gautam ",     class : " 8th ",     rollno: 6 } ] console . log ( arr1 ) console . log ( arr1 [ 5 ]) console . log ( arr1 .length) console . log ( arr1 . concat (' main ')); console . log ( arr1 ); // // ---------------------------------------------------- // CONVERSION IN JAVASCRIPT // Converting in to strings var num1 = 45 ; console . log ( num1 ); var str1 = String ( num1 ); console . log ( str1 ); console . log ( typeof str1 ); console . log ( typeof num1 ); var number1 = 33453434 ; console . log ( number1 , typeof number1 ); var string1 = number1 . toString (); console . log ( string1 , typeof string1 ); // ----------------------------...

types of operators in javascript || javascript course || codeandman (sourcecode)

hey guys how are you all today in this post I am going to give you the source code of my video called types of operators in javascript. so let's begin : here's the complete source code and the video:- // ------------------------------------------------------------------------------------ // COMPARISON OPERATORS IN JAVASCRIPT console . log (" COMPARISON OPERATORS IN JAVASCRIPT ") console . log ( 32 == 32 ) // checking if 32 is equal to 32 console . log ( 32 != 32 ) // checking if 32 is not equal to 32 console . log ( 32 >= 31 ) // checking if 32 is greater or equal to 31 console . log ( 32 < 33 ) console . log ( 32 > 30 ) console . log ( 32 <= 09 ) // ASSIGNMENT OPERATORS console . log (" --------------------------------------- ") console . log (" Assignment operators in javascript ") var d = 34 ; var e = 3 ; var a = 10 ; console . log ( d ) console . log ( d += 1 ) console . log ( d -= 3 ) console . log ( e *= 2 ) console . log...