1. print(): showing output
print() shows whatever you put inside it. Text goes inside quotes.
സ്വയം ചെയ്തുനോക്കൂ· കോഡ് മാറ്റി Run അമർത്തൂ
PythonPress Run to see the result here.2. Variables and data types
Variables store values. The main types are int (whole numbers), float (decimals), str (text) and bool (True/False).
സ്വയം ചെയ്തുനോക്കൂ· കോഡ് മാറ്റി Run അമർത്തൂ
PythonPress Run to see the result here.3. input(): reading from the user
input() always returns text. Convert it with int() when you need a number.
സ്വയം ചെയ്തുനോക്കൂ· കോഡ് മാറ്റി Run അമർത്തൂ
PythonPress Run to see the result here.4. Operators
+ - * / for maths; // for whole-number division; % for the remainder; ** for powers.
സ്വയം ചെയ്തുനോക്കൂ· കോഡ് മാറ്റി Run അമർത്തൂ
PythonPress Run to see the result here.5. if, elif, else: decisions
Indentation (spaces at the start of a line) matters in Python: it shows which code belongs to the if.
സ്വയം ചെയ്തുനോക്കൂ· കോഡ് മാറ്റി Run അമർത്തൂ
PythonPress Run to see the result here.6. Loops: for and while
for runs once for each item in a sequence; while runs as long as its condition is true.
സ്വയം ചെയ്തുനോക്കൂ· കോഡ് മാറ്റി Run അമർത്തൂ
PythonPress Run to see the result here.7. Lists and dictionaries
A list stores many values in order; a dictionary stores key-value pairs.
സ്വയം ചെയ്തുനോക്കൂ· കോഡ് മാറ്റി Run അമർത്തൂ
PythonPress Run to see the result here.8. Functions
Create a function with def and reuse it as often as you like.
സ്വയം ചെയ്തുനോക്കൂ· കോഡ് മാറ്റി Run അമർത്തൂ
PythonPress Run to see the result here.What next?
To practise each basic with challenges, start Skill Park's free Python course. Then raise your Skilled-score with practice problems and mock tests.
പതിവ് ചോദ്യങ്ങൾ
How long does it take to learn Python basics?
With 30 minutes a day, most beginners are comfortable with the basics in 2–3 weeks.
What is an IndentationError?
It happens when lines inside if, for or def are not indented consistently (use 4 spaces).
What is the difference between a list and a tuple?
A list can be changed; a tuple can't.