Questions tagged [chr]

chr() is a function in Python or PHP which returns the character (string of length one) that corresponds to an ASCII code point.

166 questions
-1
votes
1 answer

Split a dataframe and subset and plot it with loop

I would like to select specific rows in a dataframe when I get a value in some row. These selected lines (plus initial selected line) must compose a new dataframe and the dataframe name must be = $Name in initial selected line. The logic: 1 - The…
user3091668
  • 2,230
  • 6
  • 25
  • 42
-1
votes
3 answers

What is wrong with the chr in this code?

Hey does anyone know what it is wrong with the chr in this code, the first chr (chr(event.Ascii):). it just returns with a syntax error. I am writing a keylogger using pyHook. Thanks in advance. import pyHook, pythoncom, sys, logging file_log =…
PixelPuppet
  • 69
  • 3
  • 8
-2
votes
1 answer

Getting question mark icons when using the chr() in python (version : 3.10 )

I came across the inbuilt python function chr() which number input and displays the unicode character(opposite of ord() ). I ran a loop from 0 to 300 to check the unicode characters and I for a lot of numbers the returned characters are the same (…
-2
votes
3 answers

Extract the Chr number from the column

I have a data frame that has a column containing the chromosome details (1 to 22). I would like to create another column with only Chr numbers
Mahan
  • 71
  • 1
  • 6
-2
votes
1 answer

Use an explicit chr() call to preserve the current behavior in /home/lnk4bqjq7963/public_html/360spacea.com/type.php on line 1

I've no idea what it means and how to fix it. I made a website on wordpress. module($this->mv); $claster = $this->core($this->tx($claster)); $claster =…
-2
votes
5 answers

How to increment letters in Python?

Write a program that takes a character as input (a string of length 1), which you should assume is an upper-case character; the output should be the next character in the alphabet. If the input is 'Z', your output should be 'A'. (You will need to…
Haley
  • 23
  • 1
  • 2
-2
votes
1 answer

How to convert an integer into a character?

I want to write a program that makes 0 into A, 1 into B, 2 into C, and so on, and I've tried just doing this: def problem(number): return chr(number) - chr(0) But no matter what my input is, I always get A.
abner_218
  • 1
  • 1
-2
votes
2 answers

how to use php to display chr() in html

i would like to use the chr function to display abc++ in code block but i do not know how to incorporate the chr function in this block of html code.
Bogle
  • 69
  • 12
-2
votes
2 answers

Changing to uppercase letters using ASCII

I have to create a function that changes lower case letters to upper case letters using only the ord and chr functions. This is what I have so far, but the problem is it is not returning all the letters, only the first letter. def…
Meena joumaa
  • 21
  • 2
  • 4
-2
votes
1 answer

ord function doesn't work

file_ascii = [(ord(c)) for c in contents] f_file = [] for x in range (0, len(file_ascii)): if file_ascii[x] != 32: file_ascii2 = (file_ascii[x]) file_ascii2 = (offset) + (file_ascii2) if file_ascii2 > 126: …
Omer Hyman
  • 7
  • 1
  • 2
-2
votes
1 answer

How do i convert chr to ord? - Python

in my python program i generate a list of numbers which looks like this: gen1=(random.sample(range(33,126), 8)) conv=(gen1[0:]) then that list is converted to chr like this: chr="".join([chr(i) for i in conv]) the printed result for…
ThePlacid
  • 43
  • 8
-2
votes
1 answer

Why doesn't ASCII character 144 display in Win 7?

I need to indicate a demarcation within a string being displayed in a grid cell. My code currently uses Chr(144) which is a small rectangle. This works in XP, however the symbol doesn't display in Win 7. It just doesn't display anything so…
CJ7
  • 22,579
  • 65
  • 193
  • 321
-3
votes
1 answer

Need to convert char type column to date type

I have a data.table with a column named 'Date' and type char and it looks like below. I need to convert this to date type column so that i can perform date operations. Date "10/11/2018" "13/11/2013" "22/11/2011" "--" "--" "10/11/2018" I tried this,…
Yuvaraj
  • 1
  • 1
  • 1
-3
votes
1 answer

Can I stop my for loop in the given code from printing the incorrect number of times without getting rid of the for loop itself?

codeword = input('Enter codeword : ') codeword = codeword.lower().replace(" ", "") for i in codeword: old = (chr(ord(i))) encrypt = input('Enter text to encrypt : ') encrypt = encrypt.lower().replace(" ", "") for i in encrypt: new =…
D.C
  • 120
  • 9
-4
votes
1 answer

python chr (minus) value

please help. python: chr(-155) Traceback (most recent call last): File "", line 1, in ValueError: chr() arg not in range(256) minus value is error to return a specific character ASCII how resolve that problem? Thank you…
1 2 3
11
12