Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 the next higher character
#11
how is it that your answer gives one character that is higher than the one given character? and it is larger than the example i gave. this is where i think you misunderstood because it appears that your answer just prints out a list of characters instead of figuring out which is next higher after a given character.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Quote
#12
I know, this is not exactly what you want, but it comes nearby.

#!/usr/bin/python3
import string

#'a'->'b' or '4'->'5' or '9'->'a'
print(string.ascii_lowercase[0 + 1])
print(string.digits[4 + 1])
print(string.printable[9 + 1])

Quote
#13
in what way? are you trying to print a table of ASCII so i can look it up to verify if my code does it correctly? i already verified it. i just thought the code was a little long.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Quote
#14
Ok, I understood.
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  how can i handle "expected a character " type error , when I input no character vivekagrey 2 208 Jan-05-2020, 11:50 AM
Last Post: vivekagrey
  finding the next higher representable floating point value Skaperen 0 449 Sep-13-2019, 11:16 PM
Last Post: Skaperen
  Replace changing string including uppercase character with lowercase character silfer 11 1,121 Mar-25-2019, 12:54 PM
Last Post: silfer
  SyntaxError: unexpected character after line continuation character Saka 2 14,085 Sep-26-2017, 09:34 AM
Last Post: Saka
  How do I loop through a list and delete numerical elements that are 1 lower/higher? neko 4 1,590 Sep-05-2017, 02:25 PM
Last Post: ichabod801

Forum Jump:


Users browsing this thread: 1 Guest(s)