Questions tagged [letters]
251 questions
-2
votes
4 answers
How to set value of alphabet letter? C++
Well, I have to make a task, that will sort elements of array in UNIQUE way.
So, for example, if I input 1st string:
BOB, I have to do: 2+15+2 (because of their positioning in the alphabet) and then divide by amount of chars /3 and do that for all…

John Smith
- 47
- 1
- 3
- 9
-2
votes
1 answer
javascript words on top of each other
I have a javascript code that writes out a list. But the words are written on top of each other making it hard to read. No matter what i put in the list, and no matter the browser I use, the words are written atop eachother. It seems to allow…

Celeste
- 31
- 6
-3
votes
1 answer
A program that returns the letter that comes after and before
Im new to programming. The mission is to make a program that returns the pred and succ letter of a given letter as output data. The input data is any letter between b and z. I have declared every letter b-z as variables of themselves, and the input…

Urine Greyjoy
- 11
- 2
-4
votes
1 answer
I am trying to find the missing letter in a string of consecutive letters in Java
I don't understand where is the mistake. Can you tell me where is the mistake?
public class FindtheMissingLetter {
public static char findMissingLetter(char[] array)
{
char letter;
for(int i=0;i
-4
votes
2 answers
Terminate called after throwing an instance - C++ error?
In this program I have a string which I pass as a parameter to a function. I want the function to erase all adjacent letters from a string containing only letters from a-z, always ordered alphabetically. For example if i enter aaabbccd, the program…

P.Petrov
- 5
- 3
-4
votes
2 answers
What is the regular expression for checking if the word consists only of the given characters?
I need a regular expression for python 2.7 that checks if a given word consists only of the letters 'a', 'b', 'r', 'e', 'd'. Please Help!
I tried the following code:
text = raw_input ('Enter Text:')
result = re.match(r'[abred]+', text)
if result:
…
user4851943
-4
votes
4 answers
Crazy Challenge: Rotating Letters in Python Encipher Function
I'm trying to write a function rot(c,n) that rotates a single character c forward by n spots in the alphabet.
def rot(c,n):
""" rotate c forward by n characters,
wrapping as needed; only letters change
"""
if 'a' <= c <= 'z': #…

Whooperton Goldberg
- 75
- 1
- 2
- 8
-4
votes
3 answers
How to count the letters in a text with Javascript?
I am currently trying to write a ''web application'' that has a simple text area inside, in which I want the letters of the text written to be pointed out.
For example, if I write:
''How old are you? I am 19 years old''
I need a code to tell me how…

Doguhanca
- 11
- 1
- 2
-5
votes
1 answer
python: how to sort a list of letters and numbers
Such as, lista = [300KB, 12MB, 100KB, 1GB], i want to process lista, then change it to [100KB, 300KB, 12MB, 1GB]
How to sort it using simple method?

xksyvone
- 105
- 1
- 12
-5
votes
2 answers
How to count how many different letters are in one text string?
How to count how many different letters are in one text string ?

Skokaj Skokaj
- 11
- 5
-6
votes
2 answers
How to change letters to other letters Java
I am trying to make an app with java where you input a sentence, and the app changes the letters to other specified letters. What I need to know is how to do a "text input" and how to change the letters. Currently, I am not getting any errors, but…

Tyler Mullins
- 77
- 3
- 10