Mehak Monika Ip Project Final 1
Mehak Monika Ip Project Final 1
INFORMATICS
PRACTICES
PROJECT FILE
SUBJECT CODE: 065
SESSION : 2023-24
SUBMITTED BY:
Mehak Khandelwal
Monika
XII-E
ACKNOWLEDGEMENT
We want to express our gratitude to the Principal,
Dr. Pratibha Kohli, and our teacher of Informatics
Practices, Ms. Jyoti Sharma, at the Maharaja
Agrasen Model School in CD Block Pitampura,
New Delhi, for their tremendous assistance and
direction in the completion of our project. Only
because of their efforts our project was able to be
effectively finished. This project is being turned in
as a practical exam for 2023 All India Senior
Secondary Certificate Examination (AISSCE),
which is part of the Central Board of Secondary
Education's (CBSE) curriculum.
CERTIFICATE
This is to confirm that this assignment was
finished under my supervision by Mehak
and Monika of class XII-E of Maharaja
Agrasen Model School, CD Block
Pitampura, New Delhi. They have shown
the utmost sincerity and a keen interest in
seeing this project through. They
effectively finished the informatics project
work to my satisfaction. This project is
being turned in as a practical exam for
2023 All India Senior Secondary
Certificate Examination (AISSCE), which
is part of the Central Board of Secondary
Education's (CBSE) curriculum.
________________
Person Sleep
ID Gender Age Occupation Duration
Physical
Quality Activity Stress BMI
of Sleep Level Level Category
uploaded=files.upload()
dfsleep_health=pd.read_csv('Sleep_health_and_lifestyle_dataset.csv')
dfsleep_health
#choice 1
sleep_dep=6
#threshold sd at 6
occupation_sleep_deprived =
sleep_deprived['Occupation'].value_counts()
plt.figure(figsize=(8, 8))
plt.pie(occupation_sleep_deprived,
labels=occupation_sleep_deprived.index, startangle=140)
#choice 2
def age_gs():
age_group_gs = good_quality_sleep['Age'].value_counts()
plt.figure(figsize=(10, 6))
plt.xlabel('Age')
plt.ylabel('Number of Individuals')
plt.grid(True)
plt.show()
#choice 3
def occ_age_maxpal():
# Group the data by age and calculate the mean physical activity level for
each age group
# Find the age group with the maximum physical activity level
max_activity_age_group = age_group_activity.idxmax()
plt.figure(figsize=(10, 6))
age_group_activity.plot(kind='bar', color='magenta')
plt.xlabel('Age Group')
plt.legend()
plt.xticks(rotation=45)
plt.show()
#choice 4
def sleep_BMI():
# Group the data by 'BMI Category' and 'Sleep Disorder', and then count
the occurrences
plt.xlabel('Sleep Disorder')
plt.ylabel('Number of People')
plt.legend(title='BMI Category')
plt.tight_layout()
plt.show()
#choice 5
def avg_age():
average_age = dfsleep_health['Age'].mean()
plt.xlabel('Age')
plt.ylabel('Frequency')
plt.title('Age Distribution')
plt.show()
#choice 6
def age_highstress_pa():
plt.figure(figsize=(10, 6))
plt.xlabel('Age')
plt.ylabel('Average Level')
plt.legend()
plt.grid(True)
plt.show()
#choice 7
def sleep_disorder():
dfsleep_health_filtered = dfsleep_health[dfsleep_health['Sleep
Disorder'] != 'None']
sleep_disorder_counts = dfsleep_health_filtered['Sleep
Disorder'].value_counts()
most_prevalent_sleep_disorder = sleep_disorder_counts.idxmax()
plt.figure(figsize=(10, 6))
plt.bar(sleep_disorder_counts.index, sleep_disorder_counts.values,
color='skyblue')
plt.xlabel('Sleep Disorder')
plt.ylabel('Count')
plt.xticks(rotation=45)
plt.tight_layout()
#choice 8
def comparison():
plt.figure(figsize=(10, 6))
plt.subplot(131)
plt.subplot(133)
plt.title("Daily Steps")
plt.tight_layout()
plt.show()
#choice 9
def plot_bmi_vs_activity():
plt.xlabel('BMI Category')
plt.ylabel('Count')
print('Hey.',a,'! Here are some questions for you to test your sleep health.')
while True:
print("."*222)
print("\t","\t","\t","\t","\t","\t","\t","\t","\t","\t","MENU")
print("."*222)
print("."*222)
print("."*222)
print("2. To display the age group who are getting good quality (7-10) of
sleep")
print("3. To display the age group who has the maximum physical activity
level")
print("6. To display age groups that tend to have higher stress levels or
lower physical activity levels")
if ch==1:
print("THANK YOU" , a)
occ_sd()
elif ch==2:
print("THANK YOU" , a)
age_gs()
elif ch==3:
print("THANK YOU" , a)
occ_age_maxpal()
elif ch==4:
print("THANK YOU" , a)
sleep_BMI()
elif ch==5:
print("THANK YOU" , a)
avg_age()
elif ch==6:
print("THANK YOU" , a)
age_highstress_pa()
elif ch==7:
print("THANK YOU" , a)
sleep_disorder()
elif ch==8:
print("THANK YOU" , a)
comparison()
elif ch==9:
print("THANK YOU" , a)
plot_bmi_vs_activity()
elif ch==10:
print("Thank you for being with us and taking the time to review our
analysis. We hope that the insights provided have been valuable and
informative.")
break
OUTPUT
SCREEN
REFERENCES
● NCERT Informatics Practices
● https://www.kaggle.com/
● https://www.pythonforall.com/