Skip to content

Instantly share code, notes, and snippets.

View srikanthavadhanula's full-sized avatar
🤠
Focusing

Srikanth Avadhanula srikanthavadhanula

🤠
Focusing
View GitHub Profile
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
}
}
from sklearn.datasets import load_iris
import pandas as pd
# fetching the iris dataset
iris = load_iris()
dir(iris)