How Many D's Are There?

Published by superturtle2010 in

Create a function that counts how many D's are in a sentence.

Examples

CountDs("My friend Dylan got distracted in school.") ➞ 4

CountDs("Debris was scattered all over the yard.") ➞ 3

CountDs("The rodents hibernated in their den.") ➞ 3

Notes

  • Your function must be case-insensitive.
  • Remember to return the result.
  • Check the Resources for help.
Watch a quick demo on how Edabit works.