ASCII

https://python-reference.readthedocs.io/en/latest/docs/str/ASCII.html

ASCII stands for American Standard Code for Information Interchange. Computers can only understand numbers, so an ASCII code is the numerical representation of a character such as 'a' or '@' or an action of some sort. ASCII was developed a long time ago and now the non-printing characters are rarely used for their original purpose. Below is the ASCII character table and this includes descriptions of the first 32 non-printing characters. ASCII was actually designed for use with teletypes and so the descriptions are somewhat obscure. If someone says they want your CV however in ASCII format, all this means is they want 'plain' text with no formatting such as tabs, bold or underscoring - the raw format that any computer can understand. This is usually so they can easily import the file into their own applications without issues. Notepad.exe creates ASCII text, or in MS Word you can save a file as 'text only'

ASCIII:

DEC:

 65-90 (A-Z)

97-122 (a-z)

Python recognizes ASCII  goes from 0-127  

Bubble sort

Used to sort elements in Ascending order or Descending order. 

 

First, it goes from  j = 1 j=1 to  j = N − 1 j=N−1 comparing each element of the list with the next  ( (i.e. the  ( j + 1 ) th (j+1)  th   element ) . ). If the  j th j  th   element is bigger than the next one, they change places, and so on. This way, in the first iteration, the element with the greatest value goes to the last position  ( (i.e. goes to  a[N] ) . a[N]). Doing the same, in the second iteration of the loop,  j j goes from  j = 1 j=1 to  j = N − 2 , j=N−2, and the element of the second greatest value goes to one position before the last element  ( (i.e. it goes to  a[N-1] ) . a[N-1]). The program does this process until the array is sorted.

Attempt was made

x = "ricards"
sorted_characters = sorted(x)

x = "".join(sorted_characters)

print(x)

string= input("Enter your word:") 
 
x=list(string) 
 
len_x=len(x) 
 
for i in range(len_x-1): 
    for j in range(len_x-i-1): 
        if x[j]>x[j+1]: 
          x[j],x[j+1]=x[j+1],x[j] 
      
new_string="" 
for m in x: 
    new_string+=m 
 
print(new_string,"is the sorted word.") 

Github

ASCII

By Ričards Raitums