Questions tagged [capitalization]

Capitalization means changing each first letter of a string to a capital letter.

Capitalization means changing each first letter of all words in a string to capital letters. For example, "this is a test" would become "This Is A Test". In some programming languages, capitalization only makes the first letter of the string a capital, and not the first letter of each word.

412 questions
-2
votes
1 answer

Python: Pig Latin Function

I'm stuck on a really hard question for my class in which I need to create a Pig Latin converter in Python for a given string. Basically, here are the rules. For any word that begins with one or more consonants (y is considered a consonant): move…
user3483844
  • 133
  • 1
  • 1
  • 13
-3
votes
1 answer

can somone explain me how this code checks if a word is uppercase

Here is the code and im struggling to understand the line 5 and 6. I know how isupper() works but i cant understand the combinations going on. def IndexWords(InputText): words = 0 count = 2 for i in range(len(InputText)): for…
Elsahn_go
  • 1
  • 1
-3
votes
4 answers

I don't want the "t" to be capitalized in "aren't"

I started two months ago with coding so I am fairly new and I am working on a codewars challenge where I have to capitalize every word in a sentence and I am kinda lost right now. I want the "t" in "aren't" to be small but my out put always comes…
Dustpie
  • 7
  • 2
-3
votes
1 answer

Capitalizing letters in C++

I have an assignment where the user enters a student name in the format ( last name, first name). Can you help me figure out how to capitalize the first letter for both the first name and the last name? I was using this to turn the user input into…
Mir.e.222
  • 23
  • 1
  • 2
  • 9
-3
votes
1 answer

Outputting a string alternating uppercase and lowercase without using the Character class

for (int i = 0, len = input.length(); i < len; i++) { char ch = input.charAt(i); if (i % 2 == 0) { System.out.print(Character.toLowerCase(ch)); } else { …
-4
votes
1 answer

capitalising the first letter in a list

I am writing a program that takes a list of student names and sorts them to create a class roll. The list of names will be given on a one line separated by a single space. My program should work like this: Students: Peng Ivan Alan Jodi Macy Class…
ben green
  • 33
  • 1
  • 7
-4
votes
1 answer

Strtoupper() PHP for a string of mixed characters

I've been working on a project for school where I have you search for a string, and it wil query a database and return all of the words which are in that string of letters. For that, I have to use strtoupper(), which works fine if you have a string…
scrblnrd3
  • 7,228
  • 9
  • 33
  • 64
1 2 3
27
28