Pangram

Determine if a sentence is a pangram. A pangram (Greek: παν γράμμα, pan gramma, "every letter") is a sentence using every letter of the alphabet at least once. The best known English pangram is:

The quick brown fox jumps over the lazy dog.

The alphabet used consists of ASCII letters a to z, inclusive, and is case insensitive. Input will not contain non-ASCII symbols.

Source

Wikipedia https://en.wikipedia.org/wiki/Pangram

Version compatibility

This exercise has been tested on Julia versions >=1.0.

Submitting Incomplete Solutions

It's possible to submit an incomplete solution so you can see how others have completed the exercise.

Your solution


In [ ]:
# submit
function ispangram(input::AbstractString)

end

Test suite


In [ ]:
using Test

# include("pangram.jl")

@testset "empty sentence" begin
    @test !ispangram("")
end
        
@testset "pangram with only lower case" begin
    @test ispangram("the quick brown fox jumps over the lazy dog")
end
        
@testset "missing character 'x'" begin
    @test !ispangram("a quick movement of the enemy will jeopardize five gunboats")
end
        
@testset "another missing character 'x'" begin
    @test !ispangram("the quick brown fish jumps over the lazy dog")
end
        
@testset "pangram with underscores" begin
    @test ispangram("the_quick_brown_fox_jumps_over_the_lazy_dog")
end
        
@testset "pangram with numbers" begin
    @test ispangram("the 1 quick brown fox jumps over the 2 lazy dogs")
end
        
@testset "missing letters replaced by numbers" begin
    @test !ispangram("7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog")
end
        
@testset "pangram with mixed case and punctuation" begin
    @test ispangram("\"Five quacking Zephyrs jolt my wax bed.\"")
end
        
@testset "upper and lower case versions of the same character should not be counted separately" begin
    @test !ispangram("the quick brown fox jumped over the lazy FOX")
end

Prepare submission

To submit your exercise, you need to save your solution in a file called pangram.jl before using the CLI. You can either create it manually or use the following functions, which will automatically write every notebook cell that starts with # submit to the file pangram.jl.


In [ ]:
# using Pkg; Pkg.add("Exercism")
# using Exercism
# Exercism.create_submission("pangram")