The following code block is a python script with added Google Sheets script method title and arguments. I would like to use this code in a Google Sheets custom script.
function D20PROBS(INPUT1, INPUT2) {
count=0
for i in range(1,21):
for j in range(1,21):
if i+INPUT1 > j+INPUT2:
count+=1
print(count)
}
count) calculated by your python script as a custom function for Google Spreadsheet using Google Apps Script? If I misunderstand your question, I'm sorry.