Python Programming Help | Python Tutorial | Python Homework Help | Realcode4you

I. Python basics

Please note, this is not meant to be a comprehensive overview of Python or programming in general, if you have no programming experience, you should probably take other courses.

This notebook will just go through the basic topics in order:

1. Data types

  • Numbers

  • Strings

  • Printing

  • Lists

  • Dictionaries

  • Booleans

  • Tuples

  • Sets

2. Comparison Operators

3. if,elif, else Statements

4. for Loops

5. while Loops

6. range()

7. list comprehension

8. functions

9. lambda expressions

10. map and filter

11. methods

1. Data types

1.1. Numbers

In python there are three types of numbers:

  • int

  • float

  • complex

Here we use integer numbers on python.

1.2. Variable assignment

  • Variables are containers which is used to store the values..

  • Unlike any other language in python no need to declare the variables.

1.3. Strings

Python used string between either single quotation marks, or double quotation marks.

You can display a string literal with the print() function

1.4. Printing

In python if we need to print the value, then we use write the print statement and pass value inside it, it is used in different way for python versions.

1.5. Lists

Lists in python declare inside the square bracket

1.6. Dictionaries

A dictionary is a collection which is unordered, changeable and indexed. It used curly bracket and it contains key and value inside it.

1.7. Booleans

In python Boolean is declare using true and false values.

1.8. Tuples

Tuple in python used inside the open bracket and it is not changeable.

1.9. Sets

It is ordered and indexed collections in python. It declare inside the curly brackets.

2. Comparison Operators

3. Logic Operators

4. If, elseif, else Statement

5. For Loops

6. While Loops

7. Range

8. List Comprehension

9. Functions