Skip to content

Latest commit

 

History

History
116 lines (74 loc) · 8.26 KB

README.md

File metadata and controls

116 lines (74 loc) · 8.26 KB

Welcome to Week 1 of Learner Space's Python!

For the first week we will be covering some basic topics:

  • Installation and Setup
  • Introduction to Jupyter Notebooks
  • Introduction to Data Types and Data Structures in Python
  • Operators in Python
  • Conditions and Loops
  • Assignment for Week 1

We will be taking a very elementary approach for this course so that even a complete beginner can learn to code in Python. Python is the most diverse language with very varied applications in different fields such as Research, Machine Learning, Backend Web Development, Data Visualisation, Web Scraping and much more, and this is possible only because of the different libraries and frameworks available for Python. We will be covering some of the libraries in the later part of the course, so Stay Tuned!

Let's get started!

Installation and Setup

Visit this link for a detailed guide on installing and setting up Python - Python Installation and Setup

Introduction to Jupyter Notebooks

Jupyter notebook is a web based notebook environment which is widely used for interactive programming, that is, code execution combined with rich markdown text and much more. The Jupyter notebook runs a local Ipython kernel on your machine and launches in your web browser. These notebooks are also called as Ipython notebooks, and have a '.ipynb' extension instead of traditional '.py' extension for Python files. All the assignments for this course are made in Jupyter notebooks and you are expected to complete them in the notebook itself. Hence, it is important for you to get aquainted with Jupyter notebooks.

Visit this link for installing and setting up a basic notebook - Setting up Jupyter Notebook. The link also teaches you to write and execute a basic Python code in a Notebook cell.

Introduction to Data Types and Data Structures in Python

Once you have set up the environment for writing your code, we now begin with coding in Python. Let's get started.

Head over to this link - Introduction to Python Data Types and start with the topics in the 'Learn the Basics' sections one by one (till 'Basic String Operations'). These are official tutorials from the Python organisation which are well curated for beginners and contain an inbuilt Ipython shell for writing and executing your code there itself.

If you are not of the reading kind, checkout this Youtube playlist for step-by-step tutorials on Python basics (Tutorials #1 - #11 except #6, #7, #9). But make sure that you are following alongside with the video, otherwise things won't make sense later in the course.

You can also read these concepts from GeeksForGeeks. They explain each concept in good detail along with examples.

Irrespective of where you choose to read/watch from, you should be familiar with the following topics:

Operators in Python

Now that you have a basic idea about different variable data types and data structures, let us now explore how you can work with multiple variables at once in order to get your desired output. This is done using Operators.

Operators in a programming language mean the same thing as operators in maths (almost), so the only thing you need to be concerned about is the syntax of working with operators.

Head over to this link - Python Operators for a detailed description of different operators in Python. Then check out the tabs in the navigation bar on the left and read about all the operators one by one.
These are extremely important as some of the concepts explained here will be used to define other concepts later on, and to understand any piece of code analytically, you should know what each line of code is doing.
You should be familiar with the following Python operators:

  • Arithmetic Operators
  • Relational Operators
  • Logical Operators
  • Bitwise Operators
  • Assignment Operators
  • Identity Operators
  • Membership Operators

Conditions And Loops

Conditions and Loops are a core part of any program written in any programming language. You use loops whenever you want to perform a particular task repeatedly over many iterations, given a condition is satisfied. Conditions are also used without loops, as if-else conditions.

Checkout this link for a detailed article on Conditions and Loops - Conditions and Loops
You can also refer to this link from GeeksForGeeks - Conditions and Loops (Checkout all the tabs in the navigation bar on the left)
Again, if you prefer videos instead, refer to this Youtube Playlist's Tutorial #6, #7 and #9.

Make sure you have covered the following topics -

  • For loop
  • while loop
  • break statement
  • continue statement
  • If-else condition ( normal, nested, if-elif)

Learning with Hands-on code

Assignment - Week 1

Once you are done with the above topics, you can now write basic code and solve elementary problems in Python. For this week, we will be providing links to some Competitive Coding questions. Make sure to select 'PYTH 3.6' as the compiler for the code.

Once you are done with the above questions, complete the Jupyter Notebooks:

The Week 1 content is divided into 2 modules. The first one covers Data Types and Operators, while the second one covers Conditionals and Loops. These interacive notebooks introduce you to all Week - 1 concepts and syntax along with hands-on code to try yourself! Make sure to play around with the code to understand it well. Read the instructions below on how to download the notebooks.


The Assignment 1 notebook will be used for evaluation of the course, hence you are expected to complete them within the week.

Instructions to download the assignments:

  1. Open on the respective .ipynb file on GitHub

  2. In the upper right corner, there are several buttons and icons including the ones shown below. Click on the Raw Button.

    Raw Blame
  3. The python notebook opens as raw text in browser. Right click->Save as OR just press CTRL + S. Save the notebook, open it using Jupyter Notebook you just installed and start learning!

If you get stuck in any of the above questions, feel free to post them in the Telegram group. Additionally, you can also search for the problems online. Another aspect to becoming a good programmer is learning how to debug your code! it is very common to encounter error along the way of programming and in that case, try reading the error and understanding the reason behind it. More often than not, you may not be able to figure out the cause of the error yourself. So, in that case, copy the error message and google it! You would be surprised how common such practices are and there are many forums where people may have already asked similar questions and have got solutions too! Stack Overflow is one such question and answer site for professional and enthusiast programmers.

For codechef questions, you can also search for the problems online with their name and problem code and most of the times you will easily find a solution for it.

Congratualtions! You have successfully completed Week 1 of Python! Keep up the enthusiasm!

Again, if you are having any difficulties with the course, please reach out to one of the moderators and we will surely help you out.
See you in Week 2!