Python basics simply explained by someone younger than your 90 years old teacher in school
in this book we will take a look on:
- useful shortcuts
- idle python envionment
- basic commands
- Tkinter graphic
- user interface
- bringing our previous p...
After opening idle python white window will pop up, this scary place with bunch of text is called shell, shell is mostly used for testing short programs or just their parts, it can't be saved.
Click: file, new file. To create a save-able file, we will be using this one the most whenever you want to open python document you will open it though the shell otherway it will be opened in cmd and its pretty likely to crash.
Oops! This image does not follow our content guidelines. To continue publishing, please remove it or upload a different image.
Quick tip:if you aren't from english speaking country while programing still use english keyboard its more efficient. Its not easy to change, sadly rn am also used more to write on slovak keyboard so ik what am talking bout.
Quick tip number 2. : go when you want/need to make something quick use chat gpt it will save you a lot of time, however if you want to actually learn its not so recommanded.
Once again i'd like to say that idle python is usually not used for advanced apps/games so if thats what ur looking for maybe you should reconsider downloading visual studio.
After making changes in code in python file you have to save it elseway it wont work.
Your first program/simple commands
1.Print:
One of the most basic commands is print, and its pretty simple in next screenshot you will see this command and its output.
Oops! This image does not follow our content guidelines. To continue publishing, please remove it or upload a different image.
This command can be written with " or ' this command will print into shell content fo the brackets.
2. Data types and variables: Now before we slide into variabiles you have to know something about data types. Very simply explained, data are saved based on its type: numbers, characters decimals, size... even though python can assign these types automatically it does always work as we wish. In these cases we will have to manualy assign data type to variable, before i show you how, lets look at the most simple data types:
Oops! This image does not follow our content guidelines. To continue publishing, please remove it or upload a different image.