Skip to content

Commit

Permalink
Create Print given sentence into its equivalent ASCII form.py
Browse files Browse the repository at this point in the history
Create Print given sentence into its equivalent ASCII form
  • Loading branch information
princeyuviii authored Oct 26, 2024
1 parent 045ec95 commit 4da12b5
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Print given sentence into its equivalent ASCII form.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Python3 implementation for
# converting a string into it's
# ASCII equivalent sentence

# Function to compute the ASCII
# value of each character one by one
def ASCIISentence( str ):

for i in str:
print(ord(i), end = '')
print('\n', end = '')

# Driver code
str = "GeeksforGeeks"
print("ASCII Sentence:")
ASCIISentence(str)

# This code is contributed by "Sharad_Bhardwaj".

0 comments on commit 4da12b5

Please sign in to comment.