Skip to content

out-0/Python-modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Just as quick note : you may see that in some exercises we use some no sense hardcoded code that we can just replace it with a better approach, well that correct, but just to match the authorized list

Module00

  • 0: Simple introduction to print function.
  • 1: Introduce the input function also the converting int function which create a new object from the received one.
  • 2: Calculation in python.
  • 3 & 4: Introduction to conditions.
  • 5: Using the builtin range() function.
  • 6: Practice syntax.
  • 7: More conditional.

At the module0 there is 7 exercises, each one aim to make you more familiar with the python syntax.

Module01

  • 0: First using of the condition if name == "main" so strict a function to the main script.
  • 1: Represent the constructors new , init in classe and creating simple class.
  • 2: Get into methods and learn how to print an organized output.
  • 3: More practice and improve class usage.
  • 4: Implement the setter and getter to protect the important data from external direct changing.
  • 5: Introduce you to the inheritance concept and encourage you to use super() function for efficient inheritance.
  • 6: Practice inheritance, nested classes several methods types and design.

The Module exercises was wonderful the assignments was vague but solid, its let you discover the new concepts by clean way, i learned a lot like inheritance of classes also nested classes, classmethods, staticmethods, also how to design a small system with a complex component.

Module02

  • 0: Introduction to the exception and discover how u prevent your program from crashing.
  • 1: Playing with different builtin error types.
  • 2: Discover the ability to create a custom type error.
  • 3: Understand the benefits of using finally statement.
  • 4: Practice the raise keyword to raise an builtin or custom error.
  • 5: Practice all the previous concepts withing a complex system.

The Module show the power of Exceptions, that give the ability of preventing your program from crashing, and also how to create your custom exceptions with a clear specific message

Module03

  • 0: Discover the sys module and the sys.argv list that hold the command line arguments.
  • 1: Practice the command line arguments with some builtin functions.
  • 2: Practice unpacking and more builtin functions, math module, tuple data collection, exceptions.
  • 3: Introduction to 'set' data collection and its methods: union(), intersection(), difference().
  • 4: Introduction to 'dict' data collection and its methods: keys(), values(), items(), get(), update().
  • 5: A great new concept: 'yield', 'next', iter, and how to create generators to stream data instead of store it.
  • 6: Demonstrate List/dict/set comprehensions with a complex gaming system (not really complex).

The module focus on demonstrating a several new concepts, and some data collections, and also show the magic behind some functions like range() and the generators

Module04

  • 0: Introduction to open, close, read functions.
  • 1: Write method that write certain data to specific file, by its object.
  • 2: Discover the tree streams tunnels (sys.stdin, sys.stdout, sys.stderr).
  • 3: Usage of 'with' statement and how its protect the data corruption.
  • 4: Practice handling file error exceptions and protecting file data.

About

Basic python modules from the new-common-core in 42 system

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages