Questions tagged [isalpha]

83 questions
0
votes
0 answers

Python: Only keep lines with more than 3 words if characters in words are alphabetic

the following code 1 allows me to only keep lines with more than 3 words. In some lines of my large text document, there are lines with non-alphabetic characters and 3 words or less which I would like to exclude as well from my cleaned list of…
0
votes
2 answers

Challenges with guessing game of integers

I am brand new to programming and I'm building a guessing game for fun as a first program. I've already figured out the following: How to set a specific number for them to guess between 1-50 (for example) What happens when they guess outside the…
0
votes
1 answer

Trouble implementing isalpha

I've been working on the readability problem in CS50. The first step is to create a way to count only the alphabetical characters. It suggests to use the isalpha function, but doesn't really include directions on how to implement it. Below is my…
0
votes
1 answer

Why does isalpha() counter program gives wrong output? C

I'm trying to run a simple program that reads a file and returns the context and the number of alphabetical characters. Im getting a wrong output. #include #include int main() { FILE *f; char path[100],c; int sum; …
smksx
  • 47
  • 5
0
votes
1 answer

isalpha() function in C don't read

I'm trying to write the substitution cipher but, a part of it, in particular the one where it sees me if the inserted alphabet is composed only of text characters "a ... z", doesn't work me. Could you tell me why the isalpha function…
0
votes
1 answer

Replacing characters in a text using isalpha()

I want to remove the apostrophes from a text file given a certain condition, they aren't surrounded by letters. I've been able to figure out how to get the sum of apostrophes surrounded by letters with the following, using isalpha()…
RickPeck
  • 165
  • 2
  • 14
0
votes
4 answers

Python: Using .isalpha() to count specific words/characters in a word count

I've created a function which can count specific words or characters in a text file. But I want to create a condition where the function only counts a character if it is surrounded by letters. For example in the text file. 'This test is an example,…
RickPeck
  • 165
  • 2
  • 14
0
votes
1 answer

How to use properly isalpha function regarding array of strings?

I am trying to use isaplha() function in order to check every character of each string to be sure if it is alphabetic. But for some reason it does not work. Program always goes into printf() function despite of an argument of an if statement. It…
0
votes
1 answer

isalpha()? or others... debug assertion failed, circlemud game

Please excuse me for using the translator. I'm a beginner in programming. The decades-old circlemud is being modified. Although it is already localized and can be implemented in VC6.0 without any problems, there is a problem in the entry of Korean…
Narth
  • 3
  • 1
0
votes
1 answer

Don't understand this AttributeError: 'function' object has no attribute 'isalpha'

Refer the following code # import import pandas as pd import numpy as np import string # create data frame data = {'Name': ['Jas,on', 'Mo.lly', 'Ti;na', 'J:ake', '!Amy', "Myself"]} df = pd.DataFrame(data, columns = ['Name']) df # get cleanName -…
Cyrus Lentin
  • 163
  • 1
  • 7
0
votes
1 answer

Making a small calculator program, need to check if user input is a letter

I've been trying to make a small calculator program to test my own skills, due to me being pretty green when talking about coding. Anyways I'm trying to make a function with a loop that will ask for a number until a number is inputted and reject…
user10149464
0
votes
1 answer

Functionality of isalpha function

The Python program below checks if there exists an alphabet in the string and if there is no alphabet it translates it to english using a custom API and writes it to a file. Since isalpha() checks for -…
lmaololrofl
  • 103
  • 3
0
votes
3 answers

A single palindrome recursive function

Is it possible to turn this program I have written into a single recursion function that ignores case differences, white spaces, and non-English letters? For example, the program must be able to return "True" to the following string, ignoring the…
Tony Stark
  • 71
  • 1
  • 2
  • 9
0
votes
1 answer

Palindrome comparing punctuation only at the end, using pointers

This is a palindrome checker I have made in c. It works for all inputs, whether they have punctuation or not EXCEPT when the last item is a punctuation. In this case it does not skip it and compares and then says that it is not a palindrome when in…
OliviaA
  • 3
  • 3
0
votes
1 answer

Iteratively testing for an input that is numeric in Python3

I have to test if user's input is numeric. Otherwise, I need to ask for input again. It sounds simple, right? But, check the following function # Request number from user def request_number(): number = input("Please, enter the card number you…
B Furtado
  • 1,488
  • 3
  • 20
  • 34