Question

In this assignment you will provide a Python script which will calculate the Biorhythms for an individual and present the data graphically using libraries and a common algorithm. Assessment Details: B...

In this assignment you will provide a Python script which will calculate the Biorhythms for an individual and present the data graphically using libraries and a common algorithm. Assessment Details: Biorhythms were developed by Wilhelm Fließ, a colleague of Sigmund Freud, in the 19th century and were very popular in the 1970s (Troutman, 1978); despite criticisms they are still used today in fields such as work safety to sports performance (Arab, Omidvari, & Nasiripour, 2014; Zareian, Rabbani, & Saeedi, 2014). The theory underlying Biorhythms proposes that, from birth, three cycles: physical, emotional and intellectual affect our performance. Understanding these cycles can help to optimise our potential. Figure 1 Biorhythm chart over the first 66-day period after birth (after Wiki) Although there are many references available, the paper by Troutman (1978) has been attached as an early computer application. An example of an algorithm to determine the day of any date has also been attached. (https://blog.artofmemory.com/how-to-calculate-the-day-of-the-week-4203.html) Your task is to develop a Python application that can display Biorhythms for a person given their date of birth and the target date. You should be able to provide the Biorhythms for a suitable spread around the target date as well. In creating the application you should seek to provide novel views of the Biorhythm curves – views that provide insight. While you are encouraged to research and discuss your work with colleagues, the final product must be all your own work. (Screen shots of a debugger might be useful in explaining how your code works.) Any help must be acknowledged as well as any resource material.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

CODE:

REFER IMAGE FOR INDENTATION.

import datetime as dt
from numpy import *
import matplotlib.pyplot as plt

pi=3.14
bdate_in=list(map(int,input("enter your birth date : (yyyy-m-day)").strip().split("-")))
tdate_in=list(map(int,input("enter the target date : (yyyy-m-day)").strip().split("-")))

bdate=dt.datetime(bdate_in[0],bdate_in[1],bdate_in[2])# createing date object datetime(y,m,d)
tdate=dt.datetime(tdate_in[0],tdate_in[1],tdate_in[2])

delta=tdate-bdate #difference between days gives number of days between birthdate and target date
num_days=delta.days #to get only days and not time
t=arange(num_days-14,num_days+14,1) #time values with 14 days spread around target date


#physical
y1=sin((2*pi*t)/23)*100
plt.plot(t,y1,'b',label='Physical')
plt.xlabel('(t) Days after birth')
plt.ylabel('percentage')
plt.title('Biorhythms')

#Emotional
y2=sin((2*pi*t)/28)*100
plt.plot(t,y2,'g',label='Emotional')

#Intellectual
y3=sin((2*pi*t)/33)*100
plt.plot(t,y3,'r',label='Intellectual')

plt.axvline(num_days, color='black',label='Target')
plt.legend(bbox_to_anchor=(0, 1), loc='upper left', ncol=1)

plt.show()

OUTPUT:

ALL THE BEST :D

Add a comment
Know the answer?
Add Answer to:
In this assignment you will provide a Python script which will calculate the Biorhythms for an individual and present the data graphically using libraries and a common algorithm. Assessment Details: B...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • making a file You are tasked with creating a text-based program for storing data on Hotel...

    making a file You are tasked with creating a text-based program for storing data on Hotel Room Bookings - however, as this is a comparative languages course, you will be creating the same application in the following three programming languages: • Java, • Python, and • Lisp As you implement the application in each language you should keep notes on: - The features of the languages used, - Which features you found useful, and - Any issues or complications which...

  • What happened on United flight 3411?What service expectations do customers have of airlines such ...

    What happened on United flight 3411?What service expectations do customers have of airlines such as United and How did these expectations develop over time? Thank You! In early April 2017, United Airlines (United), one of the largest airlines in the world, found itself yet again in the middle of a service disaster this time for forcibly dragging a passenger off an overbooked flight. The incident was to become a wake-up call for United, forcing it to ask itself what to...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT