Class 12th CBSE CS
Write a program to display ASCII code of a character and vice versa.
Solution: –
var=True while var: choice=int(input("Press-1 to find the ordinal value of a character \nPress-2 to find a character of a value\n")) if choice==1: ch=input("Enter a character : ") print(ord(ch)) elif choice==2: val=int(input("Enter an integer value: ")) print(chr(val)) else: print("You entered wrong choice") print("Do you want to continue? Y/N") option=input() if option=='y' or option=='Y': var=True else: var=False

Fun & Easy to follow

Works on all devices

Your own Pace

Super Affordable
Popular Videos

UX for Teams
Learn the basics and a bit beyond to improve your backend dev skills.

Chris Matthews
Designer

SEO & Instagram
Learn the basics and a bit beyond to improve your backend dev skills.

Chris Matthews
Designer