This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PaymentService { | |
public void processPayment(String method, double amount) { | |
if (method.equals("CARD")) { | |
// Logic for credit card payment | |
} else if (method.equals("PAYPAL")) { | |
// Logic for PayPal payment | |
} | |
// Adding another method requires editing this method | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn.datasets import load_iris | |
import pandas as pd | |
# fetching the iris dataset | |
iris = load_iris() | |
dir(iris) |