Question 1 ASCII Case Conversion

Convert Lowercase Character to Uppercase Using ASCII Value

Write a Python program to take a lowercase character from the user and convert it to uppercase by manipulating its ASCII value (subtracting 32 from ord(char)) without using the built-in upper() method.

Solution Code Screenshot Click image to zoom
Convert Lower to Uppercase Solution
Question 2 ASCII chr() Function

Find Character Corresponding to an ASCII Code Number

Write a Python program to read an integer ASCII code value from the user (such as 65 to 90 or 97 to 122) and display its corresponding character using the chr() function.

Solution Code Screenshot Click image to zoom
Find ASCII from Num Solution
Question 3 ASCII Character Mapping

Convert Lowercase to Uppercase via ASCII Value.

Write a Python program that accepts a single lowercase alphabet character from the user. Using Python's built-in ord() function, determine its ASCII value, subtract 32 to obtain the corresponding uppercase ASCII code, and convert it back to a character using the chr() function. Display both intermediate ASCII values and the converted uppercase character.

Solution Code Screenshot Click image to zoom
Lower to Uppercase ASCII Solution
Question 4 ASCII ord() Function

Print ASCII Value of a Given Character

Write a Python program to take a character input from the user and print its corresponding numeric ASCII value using the built-in ord() function.

Solution Code Screenshot Click image to zoom
Print ASCII Value Solution
Question copied to clipboard!