An open API service indexing awesome lists of open source software.

https://github.com/nielsouvrard/python-workshop

Workshop to discover Python, designed for people with a background in C
https://github.com/nielsouvrard/python-workshop

python python3 workshop

Last synced: about 1 month ago
JSON representation

Workshop to discover Python, designed for people with a background in C

Awesome Lists containing this project

README

        

# Python Workshop

## Introduction to Python for C Programmers

Python is a high-level, interpreted programming language known for its simplicity, readability, and versatility. If you're coming from a C programming background, you'll find many differences, but you'll also discover several similarities and benefits when working with Python.

## Key Differences

- **Interpreted vs. Compiled:** Unlike C, which is a compiled language, Python is an interpreted language. This means you write code in Python, and an interpreter runs the code directly, making development faster and more interactive.

- **Dynamic Typing:** Python uses dynamic typing, allowing you to change the type of a variable during runtime. This is in contrast to C, which requires explicit type declarations.

- **Whitespace Sensitivity:** Python uses indentation (whitespace) for code blocks instead of curly braces {}. C, on the other hand, uses curly braces and semicolons to define block structures.

- **Extensive Standard Library:** Python comes with a rich standard library that provides a wide range of modules for various tasks, from file I/O to web development, making it a powerful language for many applications.

## Key Similarities

- **Algorithms and Logic:** The fundamental programming concepts like loops, conditional statements, and functions are similar in both C and Python. If you can write a loop in C, you can write one in Python.

- **Variables and Data Types:** Python shares many data types with C, such as integers, floats, and strings. However, Python's dynamic typing allows for more flexibility.

- **Memory Management:** While Python manages memory automatically, understanding memory management concepts from C can help you write more memory-efficient Python code.

- **C as an Extension:** You can integrate C code with Python using CPython, allowing you to leverage existing C libraries in your Python projects.

## Why Learn Python?

Python is a popular choice for a wide range of applications, from web development to data analysis and artificial intelligence. Its clean and readable syntax makes it an excellent language for quickly prototyping ideas and building projects. Python is probably the best language for your next project in **Mathematics**.

In this workshop, we'll explore the key features of Python and how they relate to your C programming knowledge. We'll delve into Python's data types, control structures, functions, and more, emphasizing the aspects that differ from C and those that remain similar. By the end of this workshop, you'll be well on your way to adding Python to your programming toolkit.

Let's get started!

## Links

- ### Courses (in order)

1. [Variables and Data Types](courses/variables.md)
2. [Control Flow](courses/control-flow.md)
3. [Functions](courses/functions.md)
4. [Lists and Iteration](courses/lists-and-iteration.md)
5. [Dictionaries](courses/dictionaries.md)
6. [Tuples](courses/tuples.md)
7. [Python vs. C](courses/python-vs-c.md)

- ### Exercices
[8 exercices, difficulty increasing](exercices/exercices.md)