What is your story?

RMAG news

DO WHAT YOU LOVE

when you do what you love, you will never work another day in your life

As we all know, the fun that is Python is unbelievable. It is about as easy as putting together your first furniture from Ikea. So image what you can accomplish, if you did it then could you build your own log cabin or a house from a pre-fabricated kit and you would enjoy the experience and satisfaction. This is 98% of the technology landscape, and that includes AI.

For this example, we are saying that I made an ai. You might be asking yourself, how do I build my own AI and how do I fund this project. This is the beginning and in the beginning is process of getting to know yourself and enjoying the experience.

I’ve created a list and then an array of the nicknames I have been given over the years, correlated to the year that they were assigned. This project is fun and personal. You too can learn how to engage with this still young technology.

I called my nicknames ‘magicians’ because nicknames, also known as pet names, are magical. Write a few ‘DREAM BOARD’ snippets of CODE and watch the magic unfold!

first_name = ‘anna’
last_name = ‘lapushner’
#f is format
full_name = f'{first_name} {last_name}’
print (full_name)

print (f’tntHello,n t{full_name.upper()}!’)

favorite_language = ‘ python ‘
print (favorite_language)

favorite_language.lstrip()

message = f’Be grateful for the work, {full_name.title()}!’
print (message)

magicians = [‘pesada’, ‘pesadilla’, ‘makina’, ‘pakita’,’petarda’]
print (magicians)

#for calls the looping function. Loops returns the first value in your list and keeps going down sequentially until the loop reaches the last value
# Always indent the code after the loop
# The colon at the end of the statement indicates the start of a loop
for magician in magicians:
print (magician)

import numpy as np
import pandas as pd

arr_magicians = (magicians)
print (arr_magicians)

np_arr_magicians = np.array(arr_magicians)

for magician in np_arr_magicians:
print (f'{magician.title()}, of course you dazzled your team.nYou are brilliant! YOU ALWAYS WIN!’)
print (f’nYour team is thrilled to onboard you. Your organization will guarantee you a great salary, shares of the stock, an impressive bonus, as well as a generous exit package, {magician.title()}.nnn’)

If this isn’t a good enough project to get you started on that yellow brick road to Emerald City, then you can try your hand and play with plotting.

# convert the list and array into a Pandas Series object
series_magicians = pd.Series(magicians)
print(series_magicians)

dfmagicians = pd.DataFrame(magicians,columns=[‘Magicians’])
dfmagicians

Pet_Names = [‘darling’,’shoogie’, ‘cookie’, ‘honey’,’babe’]
dfPet_names = pd.DataFrame(Pet_Names,columns=[‘Pet Names’])
dfPet_names

Age = [’42’,’26’,’20’, ’48’, ’35’]
dfAge = pd.DataFrame(Age,columns=[‘Age’])
dfAge

Frequency = [‘300′,’5041′,’1230’, ‘5’, ’40’]
dfFrequency = pd.DataFrame(Frequency,columns=[‘Frequency’])
dfFrequency

# Create a dictionary with the data
data = {‘Magicians’: magicians, ‘Pet Names’: Pet_Names, ‘Age’: Age}

# Create a DataFrame from the dictionary
df = pd.DataFrame(data)

# Print the DataFrame
print(df)

df[‘Age’] = df[‘Age’].astype(int)

import matplotlib.pyplot as plt
plt.scatter(df[‘Age’], df[‘Pet Names’], color = ‘orchid’, s = 30)
plt.xlabel(‘Age’, color = ‘deeppink’, size = 13)
plt.ylabel(‘Pet Names’, color = ‘hotpink’, size = 15)
plt.title(‘Pet Names for Anna by Age’, color = ‘r’, size = 22)
plt.show()

plt.bar(df[‘Age’], df[‘Pet Names’], width = 30, color = ‘palegoldenrod’)
plt.xlabel(‘Age’, color = ‘green’, size = 13)
plt.ylabel(‘Pet Names’, color = ‘blue’, size = 22)
plt.title(‘Pet Names for Anna by Age’, color = ‘mediumseagreen’, size = 40)
plt.show()

# BAR PLOT
age_pet_counts.plot(kind=’bar’, stacked=True)
plt.xlabel(‘Age’, color = ‘dimgrey’, size = 30)
plt.ylabel(‘Frequency of Pet Names’, color = ‘lightgrey’, size = 22)
plt.title(‘Pet Names for Anna’, color = ‘darkgrey’, size = 50)
plt.legend(title=’Magicians’)
plt.show()

Please follow and like us:
Pin Share