Sunday, July 30, 2023

How To Succeed in Life?

How To Succeed in Life?

 How To Succeed in Life?


Success in life is a subjective concept, and it can mean different things to different people. However, there are some general principles and guidelines that can help you work towards a fulfilling and successful life. Here are some tips to consider:


1. Set Clear Goals: Define what success means to you and set specific, achievable goals. Having a clear vision of what you want to accomplish will give you direction and purpose.


2. Work Hard and Stay Persistent: Success rarely comes without hard work and perseverance. Stay committed to your goals and be prepared to put in the effort required to achieve them.


3. Learn Continuously: Never stop learning and growing. Whether it's acquiring new skills, gaining knowledge, or seeking personal development, continuous learning is key to staying relevant and adaptable.


4. Take Calculated Risks: Embrace calculated risks and step out of your comfort zone. Sometimes, the greatest opportunities come from taking chances and facing challenges head-on.


5. Be Resilient: Life is full of ups and downs. Resilience is the ability to bounce back from setbacks, learn from failures, and keep moving forward.


6. Build Healthy Relationships: Surround yourself with supportive and positive people. Strong relationships can provide emotional support, networking opportunities, and valuable insights.


7. Practice Gratitude: Cultivate a sense of gratitude for what you have. Recognize and appreciate the positive aspects of your life, no matter how small they may seem.


8. Maintain a Healthy Work-Life Balance: Strive to maintain a healthy balance between work, family, leisure, and personal well-being. Avoid burnout and prioritize self-care.


9. Be Adaptable: Life is constantly changing, and being adaptable to new circumstances is essential. Embrace change and be open to new ideas and perspectives.


10. Help Others: Find ways to contribute positively to the lives of others. Acts of kindness and generosity can bring immense satisfaction and add meaning to your life.


11. Manage Finances Wisely: Make smart financial decisions and avoid unnecessary debt. Managing your finances well provides stability and freedom to pursue your goals.


12. Stay Positive and Optimistic: A positive mindset can help you navigate challenges and see opportunities in difficult situations. Focus on solutions rather than dwelling on problems.


13. Take Care of Your Health: Physical and mental health are vital for a successful life. Prioritize exercise, healthy eating, and stress management to ensure your well-being.


14. Stay True to Yourself: Be authentic and true to your values. Don't compromise your principles to please others or conform to societal expectations.


Remember, success is a journey, not a destination. It's essential to define success on your terms and pursue a path that aligns with your passions and values. Embrace the process, celebrate small victories, and be kind to yourself along the way.

Friday, July 28, 2023

Factorial a Number Using Pointers in C

 A program that will ask the user to give a number and then the program will compute the factorial value of the given number using pointers in C programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


You can buy my C++ book online at  


https://www.mindshaperspublishing.com/product/beginners-guide-to-c-programming/


You can buy my book in introduction to computer networking at 

https://www.unlimitedbooksph.com/product-page/introduction-to-computer-networking


Want to support my channel?

GCash Account

Jake Pomperada




09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.




Program Listing

#include <stdio.h> void factorial(int num, int *result_ptr) { int fact = 1; // Calculate the factorial for (int i = 1; i <= num; i++) { fact *= i; } // Store the result at the memory address pointed by result_ptr *result_ptr = fact; } int main() { int number, result; printf("\n\n\tFactorial a Number Using Pointers in C\n\n"); printf("\tEnter a number: "); scanf("%d", &number); factorial(number, &result); printf("\n\n"); printf("\tFactorial of %d is: %d\n", number, result); return 0; }

World Famous Hacker Kevin Mitnick Passed Away

Thursday, July 27, 2023

How To Become a Good Programmer?

How To Become a Good Programmer?

 

How To Become a Good Programmer?

 

Becoming a good programmer requires dedication, practice, and a mindset for continuous learning. Here are some steps you can follow to improve your programming skills:

 

1. Choose a Programming Language: Start by selecting a programming language that interests you. Common choices include Python, Java, C++, JavaScript, and others. Focus on one language at the beginning to build a strong foundation.

 

2. Learn the Basics: Familiarize yourself with the basic concepts of programming, such as variables, data types, loops, conditional statements, functions, and object-oriented programming (OOP) principles.

 

3. Online Courses and Tutorials: Enroll in online courses or follow tutorials from reputable platforms like Coursera, Udemy, or free resources like Codecademy, W3Schools, and YouTube channels dedicated to programming.

 

4. Read Books: There are numerous books available on programming, algorithms, and software design that can help you understand the principles and best practices.

 

5. Practice Regularly: Programming is a practical skill, so practice is crucial. Work on coding exercises, challenges, and small projects regularly to apply what you've learned and reinforce your understanding.

 

6. Collaborate and Seek Feedback: Join coding communities, forums, or online platforms where you can collaborate with other programmers and seek feedback on your code. This will expose you to different perspectives and improve your problem-solving skills.

 

7. Study Data Structures and Algorithms: Understanding fundamental data structures (e.g., arrays, linked lists, stacks, queues) and algorithms (e.g., searching, sorting) is essential for efficient programming.

 

8. Work on Real Projects: Move beyond exercises and tackle real-world projects. Building practical applications will enhance your skills and expose you to various challenges.

 

9. Review and Refactor Code: Analyze your own code and learn from your mistakes. Refactor your code to make it more efficient and maintainable.

 

10. Learn Version Control: Use version control systems like Git to manage your code and collaborate with others effectively.

 

11. Stay Updated: The tech industry evolves rapidly, so stay updated with the latest trends, libraries, and frameworks in your chosen language.

 

12. Practice Problem-Solving: Improve your problem-solving skills by working on coding challenges and algorithmic puzzles from websites like LeetCode, HackerRank, or Codeforces.

 

13. Participate in Open Source: Contribute to open-source projects to gain experience working on larger codebases and collaborating with other developers.

 

14. Seek Mentors: Find experienced programmers who can guide you and provide insights into best practices and career advice.

 

15. Be Patient: Becoming a proficient programmer takes time and effort. Be patient with yourself and celebrate your progress along the way.

 

Remember that the key to becoming a good programmer is consistent practice and a genuine interest in learning. Embrace challenges, stay curious, and never stop expanding your knowledge in the field of programming.

Wednesday, July 26, 2023

How To Become a C Programmer?

How To Become a C Programmer?

 

How To Become a C Programmer?

 

Becoming a C programmer requires dedication, practice, and a structured learning approach. Here's a step-by-step guide to help you get started:

 

1. **Understand the Basics of Programming**: Familiarize yourself with fundamental programming concepts like variables, data types, control structures (loops and conditionals), functions, and basic algorithms. This knowledge will serve as a foundation for learning C.

 

2. **Learn C Syntax**: Start learning the syntax and structure of the C programming language. There are numerous online tutorials, interactive platforms, and books that can help you with this.

 

3. **Choose Learning Resources**: Select good learning resources such as online tutorials, video courses, or books. Here are some popular resources to learn C programming:

 

   - Online tutorials and interactive platforms like Codecademy, Coursera, or edX.

   - Books: "C Programming Absolute Beginner's Guide" by Perry and Miller, "The C Programming Language" by Kernighan and Ritchie (often referred to as K&R).

   - YouTube channels with C programming tutorials.

 

4. **Practice, Practice, Practice**: The key to mastering any programming language is practice. Start with small coding exercises and gradually move on to more complex projects as you gain confidence.

 

5. **Work on Mini Projects**: Implement small projects to apply what you've learned. It could be a simple calculator, a text-based game, or anything that interests you. This will help you solidify your understanding and improve problem-solving skills.

 

6. **Understand Memory Management**: C programming involves manual memory management using pointers. Make sure to understand how memory allocation and deallocation work in C.

 

7. **Read C Code**: Expose yourself to existing C code. Read open-source projects or code snippets to understand how experienced programmers structure their code and solve problems.

 

8. **Get Help from the C Community**: Join programming forums, Reddit communities, or Stack Overflow to ask questions and learn from experienced C programmers.

 

9. **Practice Debugging**: Bugs and errors are a natural part of programming. Learn how to use debugging tools and techniques to identify and fix issues in your code.

 

10. **Learn Standard Libraries**: Familiarize yourself with the standard C libraries. These libraries provide pre-built functions for various tasks like input/output, string manipulation, math operations, etc.

 

11. **Explore Advanced Topics**: Once you are comfortable with the basics, dive into more advanced C topics like data structures, file handling, dynamic memory allocation, and C preprocessor directives.

 

12. **Contribute to Open Source**: Consider contributing to open-source C projects. It's a great way to collaborate with experienced programmers and improve your skills.

 

Remember, becoming proficient in C programming (or any programming language) takes time and effort. Be patient with yourself and keep practicing regularly. With dedication and persistence, you'll become a skilled C programmer.

Kilometers To Miles Using Structure in C++

Tuesday, July 25, 2023

Kilometers To Miles Using Structure in C++

 A program that will ask the user to give distance in kilometers and then convert into miles equivalent using structure in C++ programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


You can buy my C++ book online at  


https://www.mindshaperspublishing.com/product/beginners-guide-to-c-programming/


You can buy my book in introduction to computer networking at 

https://www.unlimitedbooksph.com/product-page/introduction-to-computer-networking


Want to support my channel?

GCash Account

Jake Pomperada




09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.





Program Listing


#include <iostream>

#include <iomanip>


struct Distance {

    double kilometers;


    double toMiles() const {

        return kilometers * 0.621371; // 1 kilometer is approximately 0.621371 miles

    }

};


int main() {

    Distance distance;


    std::cout << "\n\tKilometers To Miles Using Structure in C++\n\n";

    std::cout << "\tEnter distance in kilometers: ";

    std::cin >> distance.kilometers;


    double miles = distance.toMiles();


    std::cout << "\n\n";

    // Set the precision to two decimal places

    std::cout << std::fixed << std::setprecision(2);


    std::cout <<"\t"<< distance.kilometers << " kilometers is equal to " << miles << " miles.\n";


    return 0;

}


Importance of Learning Databases

Importance of Learning Databases

 

 

Importance of Learning Databases

 

Learning about databases is essential for several reasons, as they play a critical role in today's data-driven world. Here are some of the key reasons why learning about databases is important:

 

1. **Data Management and Organization:** Databases provide a structured and efficient way to manage vast amounts of data. Whether it's personal information, business transactions, or scientific research, databases help organize and store data in a way that allows for easy retrieval and manipulation.

 

2. **Data-Driven Decision Making:** In various industries, decisions are increasingly being based on data analysis. Understanding databases allows individuals to collect, process, and analyze data, enabling informed and data-driven decision-making.

 

3. **Efficient Data Retrieval:** Databases use query languages like SQL to retrieve specific information from large datasets quickly and accurately. This efficiency is vital for applications that require fast access to relevant data.

 

4. **Web Development and Applications:** Most web applications and software systems rely on databases to store and manage data. Learning databases is crucial for developers and engineers working on web development projects.

 

5. **Data Security and Privacy:** With the growing concern for data security and privacy, knowing how databases work helps in implementing robust security measures. Properly designed databases can control access, encrypt data, and ensure data integrity.

 

6. **Scalability and Performance:** Databases are designed to scale efficiently, handling increasing amounts of data and user requests. Learning about database optimization and performance tuning is essential to building high-performing applications.

 

7. **Business Intelligence and Analytics:** Databases serve as the foundation for business intelligence and analytics. Understanding databases allows professionals to extract insights from data, identify patterns, and make informed business decisions.

 

8. **Data Integration:** Many organizations deal with data from various sources. Databases facilitate data integration, allowing data from different systems to be consolidated, analyzed, and utilized effectively.

 

9. **Data Backup and Recovery:** Learning about databases includes understanding backup and recovery strategies. This knowledge is vital for protecting data from accidental loss or corruption.

 

10. **Database Administration Careers:** Database administrators (DBAs) are in demand across industries. Learning about databases opens up career opportunities for those interested in managing and maintaining databases for organizations.

 

11. **Emerging Technologies:** As technology evolves, new database systems and concepts emerge. Learning about databases ensures individuals stay updated with the latest trends and technologies in the field.

 

12. **Research and Academics:** In academia and research, databases are used to store and analyze research data. Understanding databases enables researchers to manage data effectively and draw meaningful conclusions.

 

Overall, learning about databases is crucial for anyone working with data, whether in business, technology, science, or research. It empowers individuals to handle data efficiently, make informed decisions, and contribute to the advancement of various fields through data-driven insights.

How To Learn Database?

How To Learn Database?

 

How To Learn Database?

 

Learning about databases is a valuable skill, especially in today's data-driven world. Here's a step-by-step guide on how to learn about databases:

 

1. **Understand the Basics:**

   - Familiarize yourself with fundamental concepts such as data, databases, database management systems (DBMS), tables, rows, columns, and relationships.

 

2. **Types of Databases:**

   - Learn about different types of databases, including relational databases, NoSQL databases, graph databases, and document-oriented databases. Understand when each type is suitable for specific use cases.

 

3. **Relational Databases:**

   - Focus on relational databases if you're just starting. Learn about SQL (Structured Query Language), which is essential for interacting with relational databases.

 

4. **SQL Language:**

   - Study SQL syntax for creating, querying, updating, and deleting data from databases. There are many online tutorials and resources for learning SQL.

 

5. **Database Design:**

   - Learn about database design principles. Understand normalization, entity-relationship diagrams (ERD), and how to structure data effectively.

 

6. **DBMS and Tools:**

   - Get hands-on experience with popular DBMS like MySQL, PostgreSQL, Microsoft SQL Server, or Oracle. Install these systems on your computer or use online platforms that provide database access.

 

7. **Practice with Projects:**

   - Apply your knowledge to practical projects. Create simple databases for managing personal information or build more complex applications that require data storage and retrieval.

 

8. **Data Manipulation:**

   - Learn about data manipulation using SQL. Practice writing queries to extract useful information from the database.

 

9. **Database Administration:**

   - If you want to become a database administrator (DBA), study topics like backup and recovery, performance tuning, security, and user management.

 

10. **Data Modeling and Normalization:**

    - Gain a deeper understanding of data modeling and normalization techniques to create efficient and well-organized database structures.

 

11. **Learn NoSQL Databases:**

    - Explore NoSQL databases like MongoDB, Cassandra, or Redis to understand their use cases and how they differ from relational databases.

 

12. **Web Development Integration:**

    - Connect databases to web applications. Learn how to perform CRUD (Create, Read, Update, Delete) operations using server-side languages like PHP, Python, or Node.js.

 

13. **Data Security:**

    - Understand database security concepts and best practices to protect sensitive information from unauthorized access.

 

14. **Real-World Use Cases:**

    - Explore real-world scenarios where databases play a crucial role, such as e-commerce, social media, healthcare, or finance.

 

15. **Online Courses and Tutorials:**

    - Enroll in online courses, attend workshops, and follow tutorials from reputable sources to supplement your learning.

 

16. **Join Online Communities:**

    - Participate in forums and communities related to databases. Share your knowledge and ask questions to get insights from experienced professionals.

 

Remember that learning about databases is an ongoing process, and hands-on practice is crucial. As you gain more experience, consider exploring advanced topics like database optimization, indexing, data warehousing, and big data technologies. Happy learning!

Monday, July 24, 2023

Divide Two Numbers Using Function in C++

Divide Two Numbers Using Function in C++

 A program to ask the user to give two numbers and then the program will compute the quotient of the two given  number using a function in C++ programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


You can buy my C++ book online at  


https://www.mindshaperspublishing.com/product/beginners-guide-to-c-programming/


You can buy my book in introduction to computer networking at 

https://www.unlimitedbooksph.com/product-page/introduction-to-computer-networking


Want to support my channel?

GCash Account

Jake Pomperada




09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.






Program Listing

#include <iostream>


// Function to divide two numbers

double divideNumbers(double numerator, double denominator) {

    if (denominator == 0) {

        std::cout << "Error: Division by zero is not allowed." << std::endl;

        return 0.0; // You can choose to return some appropriate value or throw an exception here.

    }


    return numerator / denominator;

}


int main() {

    double num1, num2;


    std::cout << "\n\tDivide Two Numbers Using Function in C++\n\n";

    std::cout << "\tEnter the first number: ";

    std::cin >> num1;


    std::cout << "\tEnter the second number: ";

    std::cin >> num2;


    // Call the function and store the result in a variable

    double result = divideNumbers(num1, num2);


    // Display the result

    std::cout << "\n\n";

    std::cout << "\tResult of division: " << result << std::endl;


    return 0;

}



Sunday, July 23, 2023

What is Electricity?

 

What is Electricity?

 

Electricity is a form of energy resulting from the movement or flow of electrons through a conductive material. It is a fundamental force of nature that powers many aspects of modern life. The concept of electricity has been known for centuries, but its systematic study and practical applications emerged in the 18th and 19th centuries.

 

Here's a breakdown of some key points about electricity:

 

1. **Electrons**: At the atomic level, all matter is composed of atoms, which consist of protons, neutrons, and electrons. Electrons are negatively charged particles that orbit the nucleus of an atom.

 

2. **Electric Charge**: Electrons can be transferred from one atom to another, creating an imbalance of electric charge. When an atom gains or loses electrons, it becomes negatively or positively charged, respectively.

 

3. **Electric Fields**: Electric charges create electric fields around them. These fields can exert forces on other charged particles, either attracting opposite charges or repelling like charges.

 

4. **Electric Current**: When there is a flow of electrons through a material, we have an electric current. This flow can be likened to the movement of water in a pipe. The unit of measurement for electric current is the ampere (A).

 

5. **Conductors and Insulators**: Some materials allow electrons to move freely, and these are called conductors. Common conductors include metals like copper and aluminum. On the other hand, insulators are materials that resist the flow of electrons, such as rubber or plastic.

 

6. **Voltage**: Voltage, also known as electric potential difference, is the driving force that pushes electrons through a conductor. It is measured in volts (V).

 

7. **Circuits**: An electric circuit is a closed path through which electric current flows. It typically consists of a power source (e.g., a battery or a generator), conductive wires, and loads (e.g., light bulbs, motors) that use the electrical energy.

 

8. **AC and DC**: Electric current can be of two types: Alternating Current (AC) and Direct Current (DC). In AC, the flow of electrons periodically changes direction, commonly used in household power outlets. In DC, electrons flow in one direction, commonly used in batteries.

 

Electricity plays a crucial role in various applications, such as powering homes, industries, electronic devices, transportation, and much more. It has revolutionized the way we live, work, and communicate, making it one of the most essential discoveries in human history.

Friday, July 21, 2023

What is Microsoft Windows

 

What is Microsoft Windows?

 

Microsoft Windows is a family of operating systems developed and sold by Microsoft Corporation. It is one of the most widely used operating systems in the world and has played a significant role in the growth and popularization of personal computing.

 

Windows was first introduced by Microsoft in November 1985 with the release of Windows 1.0. Since then, Microsoft has released numerous versions and iterations of the operating system, each introducing new features, improvements, and updates.

 

Some of the major versions of Microsoft Windows include:

 

1. Windows 1.0 (1985)

2. Windows 2.0 (1987)

3. Windows 3.0 (1990)

4. Windows 95 (1995)

5. Windows 98 (1998)

6. Windows Me (Windows Millennium Edition, 2000)

7. Windows 2000 (2000)

8. Windows XP (2001)

9. Windows Vista (2007)

10. Windows 7 (2009)

11. Windows 8 and 8.1 (2012)

12. Windows 10 (2015)

13. Windows 11 (expected in 2021)

 

Each version of Windows has seen improvements in user interface design, features, performance, and security. Windows operating systems have been used on a wide range of devices, including desktop and laptop computers, servers, tablets, and smartphones.

 

Windows offers a graphical user interface (GUI) that allows users to interact with their computers using windows, icons, menus, and pointing devices like a mouse or touchpad. It supports a wide range of software applications and has a vast library of third-party software available for users to install and use.

 

Microsoft Windows has become an integral part of the computing world and is utilized by millions of individuals, businesses, and organizations for various tasks, ranging from basic productivity to complex data processing and software development.

How To Learn Data Structure?

How To Learn Data Structure?

 

How To Learn Data Structure?

 

Learning data structures is a fundamental aspect of computer science and programming. Mastering data structures can greatly enhance your ability to design efficient algorithms and solve complex problems. Here are some steps to help you learn data structures effectively:

 

1. **Understand the Basics**: Start by grasping the fundamental concepts of data structures, such as arrays, linked lists, stacks, queues, trees, graphs, and hash tables. Understand their properties, advantages, and use cases.

 

2. **Choose a Learning Resource**: There are various ways to learn data structures, including books, online tutorials, video courses, and interactive coding platforms. Choose a resource that suits your learning style.

 

3. **Online Courses and Tutorials**: Platforms like Coursera, Udemy, and YouTube offer excellent data structure courses. These can provide you with structured learning paths and practical examples.

 

4. **Practice Coding**: Data structures are best learned through hands-on practice. Implement the data structures yourself in the programming language of your choice. Common languages for this purpose are Python, Java, C++, or JavaScript.

 

5. **Solve Problems**: Solve coding challenges and problems that involve data structures. Websites like LeetCode, HackerRank, and Codeforces offer a wide range of exercises to test and improve your skills.

 

6. **Analyze Complexity**: Understand the time and space complexity of different data structures and their operations. This knowledge will help you choose the most suitable data structure for specific scenarios.

 

7. **Study Algorithms**: Data structures and algorithms go hand in hand. Learn common algorithms like searching, sorting, and graph traversal, as they often utilize various data structures.

 

8. **Work on Projects**: Build small projects that involve data structures. For instance, create a simple contact book using linked lists or implement a basic search engine using hash tables.

 

9. **Review and Refactor**: After solving problems or implementing data structures, review your code and look for ways to optimize it. Refactor and improve your implementations.

 

10. **Collaborate and Discuss**: Join coding communities or forums where you can discuss data structures with other learners or experienced programmers. Sharing knowledge and learning from others can be very beneficial.

 

11. **Read Source Code**: Take a look at the source code of data structure implementations in popular libraries or open-source projects. Understanding real-world use cases can deepen your understanding.

 

12. **Stay Consistent**: Learning data structures can be challenging, but consistency is key. Dedicate regular time to practice and review what you've learned to reinforce your knowledge.

 

Remember, learning data structures is not a one-time activity. Continuously challenge yourself with new problems and explore more advanced data structures and algorithms as you progress. Consistent practice and active problem-solving are crucial to mastering data structures.

Insertion Sort in Python

Insertion Sort in Python

 A program to demonstrate insertion sort using Python programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


You can buy my C++ book online at  


https://www.mindshaperspublishing.com/product/beginners-guide-to-c-programming/


You can buy my book in introduction to computer networking at 

https://www.unlimitedbooksph.com/product-page/introduction-to-computer-networking


Want to support my channel?

GCash Account

Jake Pomperada




09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.




Program Listing

def insertion_sort(arr):

    for i in range(1, len(arr)):

        key = arr[i]

        j = i - 1

        while j >= 0 and arr[j] > key:

            arr[j + 1] = arr[j]

            j -= 1

        arr[j + 1] = key


# Example usage:

my_list = [123, 51,-6,-679, 8, 33, 12,5]

insertion_sort(my_list)

print(my_list)