Enjoy millions of ebooks, audiobooks, magazines, and more, with a free trial

Only $11.99/month after trial. Cancel anytime.

Python: Learn Python in 24 Hours
Python: Learn Python in 24 Hours
Python: Learn Python in 24 Hours
Ebook301 pages2 hours

Python: Learn Python in 24 Hours

Rating: 5 out of 5 stars

5/5

()

About this ebook

If you are one of them who easily get scared of Python’s long, complicated code, then this e-book is for you. Python is a powerful programming language used on various platforms like video streaming and file hosting services. Getting proficient in Python language means you are capable of creating scientific applications, data sciences or machine learning algorithm. The biggest advantage of Python is that it is a free language, and anyone can change, correct or improve the algorithm.


If you want to learn Python real fast, this course can be helpful to you.  It extracted some complex concepts of Python and explained them into simple steps. The e-book made Python so simple that you can easily master the Python language even if you have never coded before.


The e-book has covered various Python coding concepts like classes, objects, tuples, strings, and so on. The examples are chosen carefully to illustrate all the Python concepts in easy to understand for beginners. The book also links to the additional course, guidance and tutorials for further reference. Even kids can use this e-book as a Python dictionary, where they can quickly learn Python programming concepts.


Table Of Content


Chapter 1: Install Python


Chapter 2: Creating Your First Python Program


Chapter 3: Python Main Function


Chapter 4: Variables


Chapter 5: Strings


Chapter 6: TUPLE


Chapter 7: Python Dictionary


Chapter 8: Operators


Chapter 9: Functions


Chapter 10: IF Statement


Chapter 11: Loops


Chapter 12: Class & Objects


Chapter 13: Regular Expressions


Chapter 14: Date, time and datetime classes in Python


Chapter 15: Calendar


Chapter 16: Reading and Writing Files in Python


Chapter 17: If File or Directory Exists


Chapter 18: Python COPY File


Chapter 19: Python Rename File


Chapter 20: Python ZIP file


Chapter 21: Accessing Internet Data with Python


Chapter 22: Manipulating XML with Python


The e-book has used screenshot and graphics explicitly for explaining code examples. With this Python crash course, you will discover that Python is not what that lengthy books, expensive online courses or complicated Python tutorial books have projected. After reading this Python book, you will not only gain knowledge but able to retain the knowledge for longer.

LanguageEnglish
PublisherPublishdrive
Release dateNov 12, 2021
Python: Learn Python in 24 Hours

Reviews for Python

Rating: 5 out of 5 stars
5/5

5 ratings1 review

What did you think?

Tap to rate

Review must be at least 10 words

  • Rating: 5 out of 5 stars
    5/5
    This book presents a great approach to teaching Python. Unlike many other quick introductory Python books it can really teach you how to write Python code. It contains many real-life examples. Each concept is introduced in a clear manner, and the book is very consistent.

    2 people found this helpful

Book preview

Python - Alex Nordeen

Python: Learn Python in 24 Hours

Complete Beginner's Guide

By Alex Nordeen

Copyright 2021 - All Rights Reserved – Alex Nordeen

ALL RIGHTS RESERVED. No part of this publication may be reproduced or transmitted in any form whatsoever, electronic, or mechanical, including photocopying, recording, or by any informational storage or retrieval system without express written, dated and signed permission from the author.

Table Of Content

Chapter 1: Install Python

Installing Python

Installing Pycharm

Chapter 2: Creating Your First Python Program

Chapter 3: Python Main Function

Chapter 4: Variables

What is a Variable in Python?

How to Declare and use a Variable

Re-declare a Variable

Concatenate Variables

Local & Global Variables

Delete a variable

Chapter 5: Strings

Accessing Values in Strings

Various String Operators

Some more examples

Python String replace() Method

Changing upper and lower case strings

Using join function for the string

Reversing String

Split Strings

Chapter 6: TUPLE

Packing and Unpacking

Comparing tuples

Using tuples as keys in dictionaries

Deleting Tuples

Slicing of Tuple

Built-in functions with Tuple

Advantages of tuple over list

Chapter 7: Python Dictionary

Python Dictionary Methods

Python Dictionary in-built Functions

Chapter 8: Operators

Arithmetic Operators

Comparison Operators

Python Assignment Operators

Logical Operators

Membership Operators

Identity Operators

Operator precedence

Chapter 9: Functions

How to define and call a function in Python

Significance of Indentation (Space) in Python

How Function Return Value?

Arguments in Functions

Chapter 10: IF Statement

What is If Statement? How to Use it?

What happen when if condition does not meet

How to use else condition

When else condition does not work

How to use elif condition

How to execute conditional statement with minimal code

Nested IF Statement

Switch Statement

Chapter 11: Loops

How to use While Loop

How to use For Loop

How to use For Loop for String

How to use break statements in For Loop

How to use continue statement in For Loop

How to use enumerate function for For Loop

How to use for loop to repeat the same statement over and again

Chapter 12: Class & Objects

How to define Python classes

How Inheritance works

Python Constructors

Chapter 13: Regular Expressions

Regular Expression Syntax

Example of w+ and ^ Expression

Example of \s expression in re.split function

Using regular expression methods

Using re.match()

Finding Pattern in Text (re.search())

Using re.findall for text

Python Flags

Chapter 14: Date, time and datetime classes in Python

How to Use Date & DateTime Class

Print Date using date.today()

Python Current Date and Time: now() today()

How to Format Date and Time Output with Strftime()

How to use Timedelta Objects

Chapter 15: Calendar

Chapter 16: Reading and Writing Files in Python

How to Create a Text File

How to Append Data to a File

How to Read a File

How to Read a File line by line

File Modes in Python

Chapter 17: If File or Directory Exists

os.path.exists()

os.path.isfile()

os.path.isdir()

pathlibPath.exists() For Python 3.4

Chapter 18: Python COPY File

Chapter 19: Python Rename File

Chapter 20: Python ZIP file

Chapter 21: Accessing Internet Data with Python

How to Open URL using Urllib

How to get HTML file form URL in Python

Chapter 22: Manipulating XML with Python

How to Parse XML using minidom

How to Create XML Node

How to Parse XML using ElementTree

Chapter 1: Install Python

PyCharm is a cross-platform editor developed by JetBrains. Pycharm provides all the tools you need for productive Python development.

Below are the detailed steps for installing Python and PyCharm

Installing Python

Step 1) To download and install Python visit the official website of Python http://www.python.org/downloads/ and choose your version. We have chosen Python version 3.6.3

Step 2) Once the download is complete, run the exe for install Python. Now click on Install Now.

How to Install Python on Windows

Step 3) You can see Python installing at this point.

How to Install Python on Windows

Step 4) When it finishes, you can see a screen that says the Setup was successful. Now click on Close.

How to Install Python on Windows

Installing Pycharm

Step 1) To download PyCharm visit the website https://www.jetbrains.com/pycharm/download/ and Click the DOWNLOAD link under the Community Section.

How to Install Python on Windows with Pycharm IDE

Step 2) Once the download is complete, run the exe for install PyCharm. The setup wizard should have started. Click Next.

How to Install Python on Windows with Pycharm IDE

Step 3) On the next screen, Change the installation path if required. Click Next.

How to Install Python on Windows with Pycharm IDE

Step 4) On the next screen, you can create a desktop shortcut if you want and click on Next.

How to Install Python on Windows with Pycharm IDE

Step 5) Choose the start menu folder. Keep selected JetBrains and click on Install.

How to Install Python on Windows with Pycharm IDE

Step 6) Wait for the installation to finish.

How to Install Python on Windows with Pycharm IDE

Step 7) Once installation finished, you should receive a message screen that PyCharm is installed. If you want to go ahead and run it, click the Run PyCharm Community Edition box first and click Finish.

How to Install Python on Windows with Pycharm IDE

Step 8) After you click on Finish, the Following screen will appear.

How to Install Python on Windows with Pycharm IDE

Chapter 2: Creating Your First Python Program

In the last tutorial, we completed our Python installation and setup. It's time to create your first program.

Creating First Program

Step 1) Open PyCharm Editor. You can see the introductory screen for PyCharm. To create a new project, click on Create New Project.

Creating Your First Python Program

Step 2) You will need to select a location.

You can select the location where you want the project to be created. If you don’t want to change location than keep it as it is but at least change the name from untitled to something more meaningful, like FirstProject.

PyCharm should have found the Python interpreter you installed earlier.

Next Click the Create Button.

Step 3) Now Go up to the File menu and select New. Next, select Python File.

Creating Your First Python Program

Step 4) A new pop up will appear. Now type the name of the file you want (Here we give HelloWorld) and hit OK.

Creating Your First Python Program

Step 5) Now type a simple program - print (‘Hello World!’).

Creating Your First Python Program

Step 6) Now Go up to the Run menu and select Run to run your program.

Creating Your First Python Program

Step 7) You can see the output of your program at the bottom of the screen.

Creating Your First Python Program

Step 8) Don't worry if you don't have Pycharm Editor installed, you can still run the code from the command prompt. Enter the correct path of a file in command prompt to run the program.

Creating Your First Python Program

The output of the code would be

Step 9) If you are still

Enjoying the preview?
Page 1 of 1