Imagine you are a doctor trying to decide whether a patient has a certain illness. You ask a few simple yes/no questions: “Is the fever above 38 °C?” “Has the patient been coughing for more than a week?” “Are the lymph nodes swollen?” Each answer sends you down a different path, and after a few questions you reach a likely diagnosis. This is exactly how a decision tree works — it is a flowchart that learns from examples to make predictions or decisions. In this chapter we will see how to build such trees automatically, turn them into readable “if‑then” rules, estimate probabilities instead of just hard labels, and keep the tree from learning random noise instead of real patterns.