<jupyter_start><jupyter_text><jupyter_code>l=[2200,2350,2600,2130,2190]
print("In Feb, how many dollars you spent extra compare to January:",l[1]-l[0])
print("total expense in first quarter (first three months) of the year:",l[0]+l[1]+l[2])
print("Did I spent 2000$ in any month? ", 2000 in l)<jupyter_output>Did I spent 2000$ in any month?  False<jupyter_text>June month just finished and your expense is 1980 dollar. Add this item to our monthly expense list<jupyter_code>l.append(1980)
print("Expenses at the end of June:",l)<jupyter_output>Expenses at the end of June: [2200, 2350, 2600, 2130, 2190, 1980]<jupyter_text>You returned an item that you bought in a month of April and got a refund of 200$. Make a correction to your monthly expense list based on this<jupyter_code>l[3]=l[3]-200
print(l)<jupyter_output>[2200, 2350, 2600, 1930, 2190, 1980]<jupyter_text>2.exercise<jupyter_code>heros=['spider man','thor','hulk','iron man','captain america']
#length of the list
len(heros)<jupyter_output><empty_output><jupyter_text>2. Add 'black panther' at the end of this list<jupyter_code>heros.append('Black panther')
print(heros)<jupyter_output>['spider man', 'thor', 'hulk', 'iron man', 'captain america', 'Black panther', 'Black panther']<jupyter_text>3. You realize that you need to add 'black panther' after 'hulk', so remove it from the list first and then add it after 'hulk'<jupyter_code>heros.remove('Black panther')
heros.insert(3,'Black panther')
print(heros)<jupyter_output>['spider man', 'thor', 'hulk', 'Black panther', 'iron man', 'captain america', 'Black panther']<jupyter_text>Now you don't like thor and hulk because they get angry easily :)   So you want to remove thor and hulk from list and replace them with doctor strange (because he is cool).   Do that with one line of code.<jupyter_code>heros[1:3]=['doctor strange']
print(heros)<jupyter_output>['spider man', 'doctor strange', 'Black panther', 'iron man', 'captain america', 'Black panther']<jupyter_text>Sort the list in alphabetical order<jupyter_code>heros.sort()
print(heros)<jupyter_output>['Black panther', 'Black panther', 'captain america', 'doctor strange', 'iron man', 'spider man']<jupyter_text>odd or even numbers<jupyter_code>max = int(input("Enter max number: "))

odd_numbers = []

for i in range(1, max):
    if i % 2 == 1:
        odd_numbers.append(i)

print("Odd numbers: ", odd_numbers)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13369205298013245, 'fraction_numerical': 0.04552980132450331, 'mean_word_length': 6.82200647249191, 'pattern_counts': {'":': 0, '<': 30, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '9', 'dir': 'jupyter-structured-clean-dedup', 'id': '543084', 'license': 'MIT', 'n_tokens_mistral': 950, 'n_tokens_neox': 842, 'n_words': 265, 'path': 'arrays.ipynb', 'repo_name': 'anitha67/100DaysofMLCode', 'size': '2416'}