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.

ava4.png
Chris Matthews

Designer

SEO & Instagram

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

ava4.png
Chris Matthews

Designer

Leave a Reply

Your email address will not be published. Required fields are marked *

sign up!

We’ll send you the hottest deals straight to your inbox so you’re always in on the best-kept software secrets.