id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

konstans@stuy.edu all > rotXChar
prev  |  next  |  chance

Given a string of length 1, when it is not a letter return the same string, otherwise shift it up (shift the ASCII value up) by n places. When you pass 'z' or 'Z', wrap back around to 'a' or 'A' (respectively) N can be negative, which would shift the values downwards, and wrap from A to Z if needed.


rotXChar('A', 13) → 'N'
rotXChar('B', 1) → 'C'
rotXChar('A', -13) → 'N'

...Save, Compile, Run (ctrl-enter)

def rotXChar(c,n):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Copyright Nick Parlante 2017 - privacy