Description

Solutions

Julia



using Test


"""
count vowels of lowercase in a sentence
"""
#> "count vowels of lowercase in a sentence\n"
function getcount(s::String)::Int
    count(("aeiou"), s)
end
#> getcount (generic function with 1 method)


@testset "vowel count" begin
    @test getcount("I am a doctor.") == 4
end
#> Test Summary: | Pass  Total
#> vowel count   |    1      1
#> Test.DefaultTestSet("vowel count", Any[], 1, false, false)