sayonromeopython / python-project1

Snippets of pyhon-project1
0 stars 0 forks source link

String length and indexing #1

Open sayonromeopython opened 11 months ago

sayonromeopython commented 11 months ago

quantum_physics = "IS a fundamental theory in physics that provides a description of the physical properties of nature at the scale of atoms and subatomic particles." print(len(quantum_physics), 'is the length of the defination of quantum physics.')

book = 'Thing Fall Apart' print(book[0], book[3], book[7])

alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

user_number = int(input('Enter number to use as index: ')) print()

print('\nLetter', user_number, 'of the alphabet is', alphabet[user_number])

sayonromeopython commented 11 months ago

num = 13 String = "187" result_1 = int(String) + num
print("int('187') + 13 = ", result_1, "\n")