Questions tagged [letters]

251 questions
0
votes
3 answers

I'm stuck on "3.8.12: Replace Letter" in Java on CodeHS

The instructions are to: Write a method that replaces all instance of one letter with another. For example, replaceLetter("hello", 'l', 'y') returns "heyyo" I'm not even sure where to start but I've got this so far: String str = "Hello…
Alyssa
  • 25
  • 2
  • 3
  • 8
0
votes
5 answers

Using php to increment letters while cycling through capitilisations

I am working on a project where I need to cycle through letters something like this: a,A,b,B...z,Z,aa,Aa,aA,AA,bb...zz,ZZ... in PHP. Is it possible to do this in a scalable way?
JJJollyjim
  • 5,837
  • 19
  • 56
  • 78
0
votes
2 answers

How to return all capital letters from a string in Python?

Curious to see if there's a way to return all capital letters from a string in Python, not using is.upper, maybe using other conditionals?
svlk
  • 511
  • 1
  • 4
  • 7
0
votes
2 answers

Terms with options for capital letters in Python 2.7

So I am attempting to find letters within strings and perform actions based on whether it finds them. So far I have this: name = easygui.enterbox("What is your name?"); term1 = 'i' term2 = 'a' position1 = name.find(term1) position2 =…
0
votes
4 answers

Python 2.7, how can I find the position of group of letters in a string?

I need to know how can I find ALL the position of a group of letters in a string. For example, in the string "Canyoucanacanasacannercancanacan" the letters "an" recur 7 times. I want to know the exact position of each one, possibly in a list. How…
0
votes
1 answer

Trouble with Python excersice - Convert letters to numbers in order (using ord and chr)

I am sorry, but I am at a loss here everyone. No real idea where to start. I am new to Python and its been many years since I last tried programming of any kind. I was never very experienced. I am following this Python course online and have come to…
Serious
  • 1
  • 5
0
votes
0 answers

After displaying the data on the page, they are cut off after the point asp.net

I have a problem. When I loaded data in page, they cut off after the point. And I don't know why! In database I have table and fields have type nvarchar(50-*). Data I keep in: text.text e.g. Minsk.Labanka 17 and page display only Labanka 17. Maybe…
Kanasi
  • 59
  • 2
  • 12
0
votes
2 answers

C#: Replace random letters with letters from another keyboard layout

Sorry for my bad english. So, i have a code. public Random rnd = new Random(); public string RandomizeLetters(string text) { string variations = ""; foreach (var letter in text) { var а = new…
Behavior
  • 41
  • 8
0
votes
4 answers

convert letters into numbers (A=1; B=2...) c++

I was trying to make letters into numbers in c++. When I write in console it should count modulo and type out if ship is coming (i did all, but can't make letters into numbers :/ ) This what should happen: ABC a = 1; b=2; c=3 1*2*3=6.... So…
Dokido
  • 15
  • 1
  • 1
  • 5
0
votes
1 answer

Translating strings to another language using bash

I have created a script that gets names and surnames of people both in latin and greek characters. My challenge was to translate all greek characters to latin ones in order to create more possible Facebook links to their profiles, but use only bash…
Leajian
  • 129
  • 9
0
votes
1 answer

How do i replace letters with other letters onclick?

I would like to be able to type a word or name into an box, click a generate button and have some of the letters or words changed into a new box. For example: John Smith > Juhn Smith (change the 'o' to 'u' making Juhn Smith) or John Smith > Ron…
James
  • 1
  • 1
0
votes
1 answer

Convertng CMD line arguments to numbers character by character

In my c program I have attempted to make arguments passed by the command line to be converted into numbers. In other words I want 'a' to be equal to 1 and 'z' to be equal to 26. #include int main(int argc, char *argv[]) { int…
user7093145
0
votes
3 answers

Python: Counting how many letters are in String

I am trying to write a basic password checking program and whenever the user has used two attempts to entering the correct password I am supposed to print a hint as to how many letters are in their password. Password is the variable that I stored…
0
votes
1 answer

Error on creating word, letter, character count function n findword, findchar

I cant get this program to compile. I get an error by the auto start and auto end. That there is no name a type. Also am trying to get findword and findchar in this program to work. Any advice will be greatly appreciated. #include…
Neil
  • 1
0
votes
1 answer

How do I remove non-letters from the beginning of the string

I'm using Ruby 2.4. How do I remove non-letters from the beginning of my string? I thought I could do something like name ? name.sub(/^[^a-z]*/i, "") : nil but this neglects things like an accented a ("á") or that type of "u" with the dots above…
Dave
  • 15,639
  • 133
  • 442
  • 830