Skip to content
View OceanCollege's full-sized avatar
😇
😇

Block or report OceanCollege

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
OceanCollege/README.md

import datetime

دالة لحساب البصمة الكربونية بناءً على تاريخ الولادة والوفاة

def calculate_carbon_footprint(birth_date, death_date, energy_consumption): # حساب عدد الأيام بين تاريخ الولادة والوفاة life_span = (death_date - birth_date).days # تقدير البصمة الكربونية بناءً على استهلاك الطاقة ومدة الحياة carbon_footprint = life_span * energy_consumption return carbon_footprint

دالة لتقديم توصيات لتقليل البصمة الكربونية

def provide_recommendations(carbon_footprint): recommendations = [] # إضافة توصيات بناءً على البصمة الكربونية if carbon_footprint > 10000: recommendations.append("التقليل من استخدام السيارات الخاصة.") if carbon_footprint > 5000: recommendations.append("زراعة الأشجار لتعويض الانبعاثات.") # يمكن إضافة المزيد من التوصيات هنا return recommendations

مثال على استخدام الدوال

birth_date = datetime.date(1990, 1, 1) death_date = datetime.date(2070, 1, 1) energy_consumption = 0.5 # استهلاك الطاقة اليومي بالكيلوغرام

حساب البصمة الكربونية

carbon_footprint = calculate_carbon_footprint(birth_date, death_date, energy_consumption) print(f"البصمة الكربونية: {carbon_footprint} كيلوغرام")

الحصول على التوصيات

recommendations = provide_recommendations(carbon_footprint) print("التوصيات لتقليل البصمة الكربونية:") for recommendation in recommendations: print(recommendation) 👋 Hi, I’m @OceanCollege

  • 👀 I’m interested in ...
  • 🌱 I’m currently learning ...
  • 💞️ I’m looking to collaborate on ...
  • 📫 How to reach me ...
  • 😄 Pronouns: ...
  • ⚡ Fun fact: ...

Popular repositories Loading

  1. OceanCollege OceanCollege Public

    Config files for my GitHub profile.