Questions tagged [alphabet]

319 questions
0
votes
2 answers

Conversion of word to alphabetical values of letters c++

I'm just starting with c++ and am trying to write a program, which takes a word and converts the letters to integers matching their position in the alphabet (separated by dots) e.g. hello -> 8.5.12.12.15 (hope I got that one right ;) ) I wrote a…
TheKaltur
  • 21
  • 6
0
votes
4 answers

How to load an uppercase alphabet?

I have been trying to create a Caesar cipher program. To make it as inclusive as possible I want to be able to use upper case letters as well. I know how to load a lower case alphabet: alphabet = string.ascii_lowercase * 2 (I have timed it by two…
0
votes
2 answers
0
votes
2 answers

Limiting the alphabet for finite state automata string matching

Hi I have programmed my finite state automata string matching algorithm. However I am struggling to limit the alphabet to only two characters. My implementation looks similar to…
jonn
  • 103
  • 2
  • 2
  • 11
0
votes
4 answers

Understanding and simplifying this line

I found this example for finding all strings of an alphabet of a given length. for i in range(length): result = [str(x)+str(y) for x in alphabet for y in result or ['']] I'm trying to understand how this works and if this was implemented with…
South Paw
  • 1,230
  • 1
  • 9
  • 11
0
votes
1 answer

SQL Joining where data values may be Anglicized

I want to figure out how to join on a field when a user may have entered an English spelling of a word because of the keys available. This would be like replacing Küss with Kuss, François with Francois, José with Jose. I've seen the terms…
Joe Mc Clure
  • 71
  • 1
  • 9
0
votes
1 answer

Alphabet string code, looping

So I need to finish this program that asks user to type in a word and then he needs to write it back "encrypted", only in number. So a is 1, b is 2... For example if I give the word "bad", it should come back as "2 1 4". The program I made seems…
user2956514
  • 39
  • 1
  • 1
  • 5
0
votes
1 answer

Alphabet to integers

I'm trying to create a programm in which a user inputs a string e.g 'roller' and the program converts the alphabet to numbers such as a=1, b=2, c=3 etc, and the calculate the sum of these values. But, if the program finds two same letters in a row…
thr
  • 35
  • 1
  • 9
0
votes
4 answers

Strings to Integers

Say you have the string "Hi". How do you get a value of 8, 9 ("H" is the 8th letter of the alphabet, and "i" is the 9th letter). Then say, add 1 to those integers and make it 9, 10 which can then be made back into the string "Ij"? Is it possible?
HLatfullin
  • 13
  • 2
  • 8
0
votes
2 answers

C program doesn't work correctly

#include #include void main() { char alfavita[30] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', …
user3697574
  • 121
  • 1
  • 3
0
votes
5 answers

PHP Count 1 too many on Array as it's 0 based?

I've had this problem a few times now when for looping over an array item. In this instance I'm generating all 2 letter combinations of the alphabet. The code works (and I know there's a much easier way of doing it with 2 for loops, but I'm trying…
Alexander Wigmore
  • 3,157
  • 4
  • 38
  • 60
0
votes
1 answer

Alphabet array not work after 7th index ("h")

I have following alphabet array $_CharCodes = array( "A" => 01, "B" => 02, "C" => 03, "D" => 04, "E" => 05, "F" => 06, "G" => 07, "H" => 08, "I" => 09, "J" => 10, "K" => 11, "L" => 12, …
Sadee
  • 3,010
  • 35
  • 36
0
votes
1 answer

ordering in modified/deranged alphabet in haskell

I have a string containing the whole alphabet and then I want a different string from it by choosing a keyword and adding it to an exact position and then ordering the rest of the characters of the alphabet. For example with a keyword gamer and a…
0
votes
2 answers

Why does my frequency of alphabet charactors come out as 0?

my program reads a file of words and im trying to print the frequency of how many words start with each letter of the alphabet. but my frequency keeps coming out as "0". Can anyone help me? this is my program: while (in.hasNext()) { …
0
votes
6 answers

python get list element according to alphabet

I have a list of names alphabetically, like: list = ['ABC', 'ACE', 'BED', 'BRT', 'CCD', ..] How can I get element from each starting letter? Do I have to iterate the list one time? or Does python has some function to do it? New to python, this may…
JudyJiang
  • 2,207
  • 6
  • 27
  • 47