Skip to content

Alagwudavid/my_projects_on_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MY PYTHON PROJECTS

Contributing:

We welcome all students to join this project! Feel free to fork this repo, add new features, and open pull requests. Let's make Super Python Projects even more powerful!

Contents

Getting-Started:

  1. Clone this repository or download the zip file.
  2. Install the required dependencies: pip install -r requirements.txt
  3. Run the script: python [filename].py
  4. You can now analyze my python files.

Simple-Calculator

  • this is a simple python calculator that calculates using the mathematical expressions i.e: +, - , *, % for a one-time solving.
    • code below:
      def calculator():
        num1, sign, num2 = input("clc: ").split()
        num1 = int(num1)
        num2 = int(num2)
        if sign == "*":
        ...
          ### view file to view full version
        ...
        else:
            print("Invalid operator. Please use +, -, *, /, or %.")
      calculator()```
      
      

Class method

Class Name:
    static_variable = "comes before a method def __init__(self, arg=value)"

def main():
    Name.static_variable //to access the static variable in your methods
main()

Constant Variables on python

Fixed or Constant variables can be achieved and accessed in the program by typing variable name in uppercase and cannot be changed later in the program except from the main variable itself

EXAMPLE_CONSTANT = 20

Lists

creating a list:
using "variable_name = []"

Dictionary items

symbols = {"A": 2, "B":4, "C":6, "D":8}

for symbol, symbol_count in symbols.items():

Notice

this projects are my beginner projects on my self taught python language learning journey, if there is any way the codes in any way you debug and identify a bug you can contact or request to correct the codes to improve my learning journey.

Author and License Information

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages