Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 587 Bytes

File metadata and controls

31 lines (23 loc) · 587 Bytes

What Did I Learn?

In this challenge, I learned two functions and two loops that traverse a string:

  1. Function
abs()

We use it to get the module of a number

  1. Function
ord()

We use it to get the value of a letter in the ASCII table

  1. Loop with index and value in string
s = "hello"
for i, value in enumerate(s):

With this loop we can get both the index and the value of each letter in the word

  1. Loop with index in string
for i in range(len(s)):

With this loop we can get only the index of each letter in the word