40 questions
-2
votes
2
answers
1k
views
I need to check if a string is a pangram string or not is my code correct?
public static class Inova
{
public static bool IsPangram(string str)
{
int compteur = 26;
for (int i = 0; i <= str.Length; i++)
{
if (('A' <= str[i] ...
0
votes
2
answers
483
views
Pangram detection
beginner here--
Given a string, my code must detect whether or not it is a pangram. Return True if it is, False if not.It should ignore numbers and punctuation.
When given "ABCD45EFGH,IJK,...
1
vote
5
answers
3k
views
Pangram in C using functions
When I input The quick brown fox jumps over the lazy dog, the following program prints not a pangram. Yet, I expect s to be 26 and printf("pangram") to be executed. What am I doing wrong?
#...
0
votes
3
answers
1k
views
How to detect wether or not a string is a pangram and return true or false
A pangram is a sentence that contains every single letter of the alphabet at least once. For example, the sentence "The quick brown fox jumps over the lazy dog" is a pangram, because it uses ...
-1
votes
8
answers
377
views
Whats wrong with my python pangram function
Its a function that checks whether a string is a Pangram or not
so if str1 == 'the quick brown fox jumps over the lazy dog' the function will return True since the string contains every letter in the ...
-1
votes
2
answers
305
views
Checking Pangram in Python
I am trying to use .pop to check the pangram and have the following code but get the error "'str' object has no attribute 'pop'". I am new to programming. Please help.
import string
def ispangram(...
1
vote
1
answer
158
views
Errors in Python Pangram Checker on Exercism.io
I am trying to solve this problem on Exercism.io's Python track and am passing all tests except tests for mixed case and punctuation, only lower case, numbers, and underscores. There are 10 tests and ...
1
vote
5
answers
1k
views
Pangram using hashset in java
i am trying to determine whether the string is pangram or not by using set in Java
I've tried the below code.Now the output is showing as not pangram but it should be a pangram. Pls tell me whats ...
0
votes
3
answers
470
views
Testing for pangram
I have seen a way of testing whether a string is a pangram -- a sentence containing every letter of the alphabet -- but I didn't quite understand it. I want to know why my way isn't working.
def ...
0
votes
1
answer
50
views
Why doesn't lists:all work for pangram in erlang
Can someone explain to me why this code below for solution to pangram in Erlang work ?
139> Sentence.
"abcdefghijklmnopqrstuvwxyz"
140> lists:all(lists:seq($a, $z), fun(X) -> lists:member(X, ...
2
votes
2
answers
976
views
RegExp "i" case insensitive VS toLowerCase() (javascript)
I'm hoping someone can explain to me why I need to use "toLowerCase()" if I'm already using a regular expression that is case insensitive "i".
The exercise is a pangram that can accept numbers and ...
-6
votes
1
answer
87
views
What's wrong with my code for pangram function?
I wrote this code for a function to check for pangram and it doesn't work. I need an explanation as to where I am getting it wrong.
def is_mypangram(phrase):
alphabets = '...
-5
votes
1
answer
39
views
Reason for different behavior of the similar junit tests
I am using the following two tests for the common pangram program. But test2 passes while test3 fails.
@Test
public void test2(){
Pangram4 pangram4 = new Pangram4(" b cd x rs ijk pno ...
-4
votes
1
answer
144
views
Pangram Checker not working
This the code I have been using but it is working for strings which are not pangram but not the other way. Also for the strings which have duplicate.
int i;
char l,ch;
String s="";
Scanner ...
3
votes
7
answers
34k
views
How do I check if a string contains ALL letters of the alphabet in python?
I am trying to write a python program that checks if a given string is a pangram - contains all letters of the alphabet.
Therefore, "We promptly judged antique ivory buckles for the next prize" ...
10
votes
10
answers
22k
views
Javascript Pangram Regex
I am trying to write a REGEX to test for a PANGRAM. I can do it the traditional way, but cannot seem to solve it for more than 90% of my tests with a regular expression.
Input: string
Output: true ...
0
votes
16
answers
28k
views
Code to tell whether a string is a Pangram or not?
import java.io.*;
import java.util.*;
public class Solution {
public static final int n = 26;
public int check(String arr) {
if (arr.length() < n) {
return -1;
...
1
vote
5
answers
5k
views
Need help on Python
Q: 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. Your task here is to write a function to check ...
3
votes
3
answers
1k
views
Finding how many different letters there are in a string in Python
I'm very new to Python 3 and programming for that matter. I trying to find an algorithm to find out when a sentence is a pangram. I've solved that side of the bargain thanks to a function with the aid ...
7
votes
4
answers
4k
views
How would you write a program to find the shortest pangram in a list of words?
Given a list of words which contains the letters a-z at least once, how would you write a program to find the shortest pangram counted by number of characters (not counting spaces) as a combination of ...