A single short video walks a beginner through Python basics from installation to file handling.
Open the Chrome browser, search Python install and go to the python.org link, then download the latest version, which is 3.7 at the time of this video. Open the downloaded file and install it, ticking Add Python 3.7 to path while installing, then click Install Now.
Click the Start button and search IDLE, then open the Python 3.7 32-bit result that appears. Choose File, then New File, and write your code there, for example a print statement with hello world inside the brackets. Press F5, save and name the file, and the output shows.
Variables are containers of values. Writing a equal to 1 and b equal to 3 makes integer variables, so print a plus b gives 4. Writing c equal to this is me makes a string variable, and d equal to 3.4 makes a float. The type function reports class float, class string or class int.
A list is just a container of variables, and it can hold integers, strings, even another list. You write items equal to square brackets with 1, 2, 3 inside; printing its type gives class list. Writing items 0 equal to Manish changes the first element, because counting starts from 0.
A dictionary is a key value pair, denoted by curly braces, and its type shows as class dict. Storing virat with the value 100 and printing dict1 shows virat is 100. The .get method with virat returns 100, .items shows all the items, and .keys prints only the keys.
Use an if statement, such as if var is greater than 4, print variable is greater, with an else branch for the other case. Indentation shows what sits inside the if, because Python has no curly braces like JavaScript or C++. elif checks additional conditions, like whether the variable is 2.
Write for i in range, which is a function, from 0 to 100, then print i inside it. That actually prints 0 to 99, because it starts at 0 and ends at n minus 1, so write 101 to get 0 to 100. A while loop needs i equal to i plus 1 written manually.
Use the def keyword with the name of the function, then give it the variables it takes, here num1 and num2. Inside write avr equal to num1 plus num2 upon 2, and then return avr, so that value comes back to whatever you assign it to. Printing average 3 comma 6 gives 4.5.
Tuples and lists are almost the same; the difference is that you cannot change the elements of a tuple. A tuple uses parentheses instead of square brackets, like tube1 equal to 1, 2, 3, and its type is class tuple. Writing tube 0 equal to 2 errors: tuple object does not support assignment.
Right click the Start button and select PowerShell or Command Prompt. There you write pip install and the name of the module, so pip install flask installs Flask and all of its dependencies as well. Built-in modules like Math need no install, only import Math.
“If you watch this video completely, I can guarantee you that you will never have a problem in writing Python code.”
“While installing, you should check the add of add Python 3.7 to path.”
“in python index starts with 0”
“That's why it is considered a very good programming language for beginners”
“It will say that tuple object does not support assignment.”
“We use indentation because we don't use curly braces like JavaScript or C++.”
“15 Minute Python Tutorial For Beginners In Hindi (Full & Complete Python Crash Course).” https://www.youtube.com/watch?v=fr1f84rg4Nw. Transcript summary by WhipScribe, https://whipscribe.com/transcript-pages/15-minute-python-tutorial-for-beginners-in-hindi-full-comple.html.