12.5k views
4 votes
Write code to output the ASCII characters that are represented by the numbers from 45 to 85, one per line.

User Misho
by
3.4k points

1 Answer

1 vote

Answer:

following are the program to this question:

for i in range(45,86): #defining loop, that count form 45 to 86.

print(chr (i))

#convert the value into character and print its value.

Output:

Please find the attachment.

Step-by-step explanation:

The description of the above python code can be described as follows:

  • In the above program, a for loop is declare, which uses a range keyword, which is the inbuilt method, that is used to collect a specific range of the data.
  • In the next step, the print method is used, which uses the "chr" method, which is also an inbuilt method, that converts all integer value into the ASCII code.
Write code to output the ASCII characters that are represented by the numbers from-example-1
User Narvalex
by
3.2k points