Java to Python in 100 Easy Steps

Video description

This course will help you learn Python, one of the most popular programming languages. Python offers both object oriented and structural programming features. We take a hands-on approach using a combination of Python Shell and PyCharm as an IDE to illustrate more than 100 Python coding exercises, puzzles, and code examples. We convert a number of Java examples to Python. You will learn about implementing Object Oriented Programming concepts in Python, inheritance, abstract classes, and constructors; you will also get a better understanding of a wide variety of Python data structures: lists, sets, dictionaries, and tuples.

What You Will Learn

  • Start your journey as a Python programmer
  • Develop awesome object-oriented programs with Python
  • Implement Object Oriented Programming concepts in Python: inheritance, abstract classes, and constructors
  • Master a wide variety of Python data structures: lists, sets, dictionaries, and tuples
  • Solve a wide variety of hands-on exercises with Python

Audience

This course is designed for experienced Java Programmers; no prior knowledge of Python is required.

About The Author

Ranga Rao Karanam: Ranga Rao Karanam is the founder of in28Minutes, a company that trains 300,000 developers across the globe in relation to the cloud, microservices, Spring, Spring Boot, and Containers. He loves programming, and loves consulting for start-ups on developing scalable cloud applications and following modern development practices, such as BDD, continuous delivery, and DevOps.

In his spare time, he loves hiking, cricket, and tennis. His ambition is to spend a year hiking the Himalayas.

Table of contents

  1. Chapter 1 : Introduction
    1. Introduction-to-the-Course
    2. Introduction-to-the-Course-Guide
    3. Installing Python 3 and Launch Python Shell
    4. Installing PyCharm
  2. Chapter 2 : Getting Started With Python
    1. Hello World in Python
    2. Hello World in Python - Making Sense
    3. Importing-Java-Code-into-Eclipse
    4. Your First Python Method
    5. Your First Python Method - A Few Tips
    6. Passing Parameters and Your First Python Loop
    7. Exercises with Python Methods and For Loop
    8. Python For Loop – Puzzles
    9. Writing Java Example in Python - Part 1
    10. Writing Java Example in Python - Part 2
    11. Returning values from methods
    12. Introduction to Basic Data Types in Python
    13. Python is Strongly Typed and Dynamic Language
    14. Numberic Operators and Functions in Python
    15. Boolean Operators in Python
    16. Python Text Data Type – String
    17. Data Type Conversion – Puzzles
    18. Strings are immutable
    19. There is no separate Character data type
    20. String module
    21. Exercise - is vowel, print lower case and upper case characters
    22. String - Exercises and Puzzles
  3. Chapter 3 : Conditionals and Loops
    1. Overview of Conditionals and Loops in Python
    2. Shortcut If Statement
    3. If Else and Elif in Python
    4. If Elif Exercise - Java to Python
    5. Conditionals - Java vs Python
    6. For Loop - A Review
    7. For Loop - A few examples
    8. While Loop in Python - Introduction and Exercise
    9. Implementing Do While with While
  4. Chapter 4 : Object Oriented Programming with Python
    1. OOPS in Python - An overview
    2. Your First Python Class - Empty Class and Instances
    3. Instance Variables and Constructors in Python
    4. Exercise - Part 1 - Add an attribute
    5. Exercise - Part 2 - Create a new Class
    6. Constructors in Python - A few tips
    7. Adding instance methods
    8. OOPS Under the Hood
    9. Inheritance in Python
    10. Multiple Inheritance in Python
    11. Every class extends object
    12. Creating an Abstract Class
    13. Representing an Interface using Abstract Class
    14. Polymorphism and Duck Typing
    15. Static Variables at Class Level
    16. Static Methods in Python
  5. Chapter 5 : Python Data Structures
    1. Introduction to Data Structures in Python
    2. Operations on List Data Structure
    3. Puzzles with Strings Lists
    4. List Slicing
    5. List Sorting, Looping and Reversing
    6. List as a Stack and Queue
    7. List with a custom class - Country and representation
    8. List with a custom class - Part 2 - sorting, max and min
    9. List Comprehension
    10. Introduction to Set
    11. Introduction to Dictionary
    12. Puzzles with Data Structures
    13. Tuples
  6. Chapter 6 : Exception Handling in Python
    1. Part 1 - Overview of Exception Handling
    2. Part 2 - Exceptions in Python
    3. Exception Handling with try except else finally block
    4. Throwing Custom Exceptions in Python
  7. Chapter 7 : Functional Programming
    1. Functions are First Class Citizens in Python
    2. Introduction to Lambdas
    3. Filtering a list using filter method
    4. Mapping a List with map method
    5. Reduce a List to one result value
    6. Combining map, filter and reduce - Example 1
    7. Combining map, filter and reduce - Example 2
  8. Chapter 8 : Built-In Python Modules
    1. Tip 1 - Using Predefined Python Modules
    2. Tip 2 - Math Module and Decimal Class
    3. Tip 3 - Statistics Module - find mean and median
    4. Tip 4 - Collections Module - deque for Queue and Stack
    5. Tip 5 - Date Module
  9. Chapter 9 : Python Tips
    1. Tip 1 - Loop - Getting Index Element
    2. Tip 2 - Enum in Python
    3. Tip 3 - Methods and Arguments – Basics
    4. Tip 4 - Methods and Arguments - Keyword Arguments
    5. Tip 5 - Methods and Arguments - Unpacking Lists and Dictionaries
    6. Tip 6 - PEP8 - Python Style Guide
    7. Tip 7 - PEP20 - Zen of Python
    8. Tip 8 - Creating Custom Modules and Using Them
    9. Tip 9 – None
    10. Tip 10 - repr vs str
    11. Tip 11 - No Switch in Python
    12. Tip 12 - Generating Random Values in Python
    13. Tip 13 - Returning Multiple Values using Tuples
    14. Tip 14 - Implementing Data Classes with namedtuple
    15. Tip 15 - Getters and Setters is Python Anti Pattern
    16. Tip 16 - Implementing Property Decorators
    17. Tip 17 - Operator Overloading - Adding and subtracting amounts
    18. Tip 18 - Operator Overloading - Other Operators
    19. Tip 19 - Comparing equality of objects
    20. Tip 20 - Using greater than and less than to compare objects
    21. Tip 21 - Total Ordering - Simplifying object comparison
    22. Congratulations

Product information

  • Title: Java to Python in 100 Easy Steps
  • Author(s): Ranga Karanam
  • Release date: August 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781789611960