How to resolve the algorithm Pangram checker step by step in the TUSCRIPT programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Pangram checker step by step in the TUSCRIPT programming language

Table of Contents

Problem Statement

A pangram is a sentence that contains all the letters of the English alphabet at least once. For example:   The quick brown fox jumps over the lazy dog.

Write a function or method to check a sentence to see if it is a   pangram   (or not)   and show its use.

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Pangram checker step by step in the TUSCRIPT programming language

Source code in the tuscript programming language

$$ MODE TUSCRIPT,{}
alfabet="abcdefghijklmnopqrstuvwxyz"
sentences = *
DATA The quick brown fox jumps over the lazy dog
DATA the quick brown fox falls over the lazy dog
LOOP s=sentences
 getchars      =STRINGS    (s," {&a} ")
 sortchars     =ALPHA_SORT (getchars)
 reducechars   =REDUCE     (sortchars)
 chars_in_s    =EXCHANGE   (reducechars," '  ")
 IF (chars_in_s==alfabet) PRINT "   pangram: ",s
 IF (chars_in_s!=alfabet) PRINT "no pangram: ",s
ENDLOOP

  

You may also check:How to resolve the algorithm A+B step by step in the 8th programming language
You may also check:How to resolve the algorithm Update a configuration file step by step in the Fortran programming language
You may also check:How to resolve the algorithm Sum of a series step by step in the RLaB programming language
You may also check:How to resolve the algorithm Permutations step by step in the Amazing Hopper programming language
You may also check:How to resolve the algorithm Index finite lists of positive integers step by step in the 11l programming language