Questions tagged [alphabet]

319 questions
-1
votes
2 answers

What is the best way to replace a letter with the letter following it in the alphabet in Java?

I'm a programming newbie and I am doing a coderbyte exercise that says " Replace every letter in the string with the letter following it in the alphabet (ie. c becomes d, z becomes a)" i'm thinking of the following methods: declare a string called…
-1
votes
1 answer

encrypt alphabet to unicode does not work

This is project from freecodecamp where a string is encrypt by the values of the letters are shifted by 13 places All letters will be uppercase. Do not transform any non-alphabetic character (i.e. spaces, punctuation), but do pass them on. i test…
user16739579
-1
votes
1 answer

Sort array alphabetical as nordic/locale order

I'm sorry - im learning PHP. Looking for help to sort array by name - but as my locale alphabet. I would like to sort array as nordic alpabet and I would want to leave rows with numbers last, I tried with multisort with setlocale but I could not…
Rookie
  • 15
  • 6
-1
votes
2 answers

Python vowels constant

Is there a Python library that contains a variable which contains vowels, e.g. 'aeiou', ['a', 'e', 'i', 'o', 'u'] or something like that? in the string library there is ascii_lowercase variable with the English alphabet, but extracting vowels and…
eerio
  • 43
  • 2
  • 6
-1
votes
1 answer

Ruby Alphabet sorting

I was going through some questions on HackerRank, that need to sort data a substring alphabetically "the shortest comes first" for example ["cd","cc","cca", "ccb"] the expected output should be ["cca","ccb","cc","cd"] my output is shown as…
-1
votes
2 answers

Count capital letters from file c++

// C++ program to count the uppercase #include #include #include using namespace std; // Function to count uppercase int Count ( string str ) { int upper = 0; for (int i = 0; i < str.length(); i++) { if…
TripHazeX
  • 5
  • 1
-1
votes
4 answers

Taking up some lines of text and analyzing

I need to break up a line of text entry into 4 parts to be analyzed. Does anyone know how to code so I take in 4 lines of text, 40 characters per line, and analyze? Thank you for any help on this problem. Here is the algorithm: Algorithm: * …
Quang
  • 15
  • 2
  • 2
  • 9
-1
votes
1 answer

Ordering file content in alphabetic order using Python

In Python, I'm getting a list with emptiness ( i.e. [ ] ) in it and testing mechanics indicate that its not sorting the content properly. It fails to pass the sorting of items contained in a file. Write a program that inputs a text file. The…
Julian
  • 1
  • 4
-1
votes
2 answers

I have to make a pyramid of letters in the middle of the screen i am able to print the pyramide but can not seem to get the alphabet and to go in

https://i.stack.imgur.com/5rpBR.png https://i.stack.imgur.com/ZH04N.png def full_pyramid(rows): print('\nFull pyramid...\n') for i in range(rows): print(' '*(rows-i-1) + '*'*(2*i+1)) string =" " reversed_string =…
arnie0505
  • 3
  • 2
-1
votes
2 answers

Why does my C# function returning the position of a letter in the alphabet work?

I have a function that returns the position of a letter in the alphabet. How does it work? This is how my C# looks like: private int CalculateLetterPosition(char cCharacter) { int iReturn = 0; int iCharacterValue =…
Norbert Willhelm
  • 2,579
  • 1
  • 23
  • 33
-1
votes
2 answers

Converting letters to alphabet position with two JLists

I'm trying to replace all words (alphabet letters) from JList1 to the number corresponding its place in the alphabet to JList2 with the press of the Run button. (ex. A to 01) And if it's not an English alphabet letter then leaving it as it is.…
tags
  • 3
  • 2
-1
votes
1 answer

How do you use one button to switch upper case and lower case by using javascript

We need one button to switch upper case and lower case of 26 alphabet by using JavaScript, just like android input method did. The code of using two button is as below. In order to save space, we just gave 3 alphabet button. Any help is…
Andy Tang
  • 9
  • 4
-1
votes
2 answers

How to calculate all possible combinations of two alphanumeric characters?

Having an alphabet of letters A-Z and numbers 0-9, how to get all 1296 possible combinations like: ['AA', 'AB', ..., 'AZ', 'A0', 'A1', ..., 'Z9', '0A', '0B', ..., '98', '99'] As a side question, what is this type of number system called?
-1
votes
1 answer

Python: Scanning a file for a (3 letter) word

I don't even know how to go about scanning a file (line by line) for a word (with 3 letters) in a logical way, that will let me set a suggested (3 letter) word as a variable (or maybe something better for me to call upon later?). With that variable,…
Ethan McRae
  • 124
  • 2
  • 13
-1
votes
2 answers

How to store a sequence of digits (or sequence of characters from some other set)?

I want to save some sequence of digits, which may be a number (eg 12345, 1230) or not (eg 00123, 0120). Which type of column is the most effective (by memory, by indexing speed) for that purpose? Also, I need to store strings of characters from…