Functional programming is when you use pure functions, which are functions that do not have any side effects, such as modifying global variables or changing the state of the program. Functional programming emphasizes immutability, recursion, and higher-order functions, which are functions that can take other functions as arguments or return them as results. For example, if you want to filter a list of numbers based on some condition, you might use a higher-order function that takes a predicate function and a list as arguments and returns a new list. Object-oriented programming is when you use objects, which are entities that have attributes and methods, to model the real world or the problem domain. Object-oriented programming emphasizes encapsulation, inheritance, and polymorphism, which are concepts that allow you to hide the implementation details, reuse code, and handle different types of objects with the same interface. For example, if you want to filter a list of numbers based on some condition, you might use a method that belongs to a class that represents a list and takes a predicate function as an argument and returns a new list. To change your code from functional to object-oriented, or vice versa, you need to identify the data structures and behaviors you need. Functional code gives you more modularity and testability, but can be hard to read and debug. Object-oriented code gives you more expressiveness and extensibility, but can be complex and redundant.