└── creation time /creation time: -------------------------------------------------------------------------------- 1 | import random 2 | 3 | def calculate_hours_per_day(paintings, sculptures, months): 4 | # Define the time ranges for creating paintings and sculptures 5 | painting_time_range = (5, 7) # hours 6 | sculpture_time_range = (15, 20) # hours 7 | 8 | # Calculate total hours required for paintings 9 | total_painting_hours = sum(random.randint(*painting_time_range) for _ in range(paintings)) 10 | 11 | # Calculate total hours required for sculptures 12 | total_sculpture_hours = sum(random.randint(*sculpture_time_range) for _ in range(sculptures)) 13 | 14 | # Calculate the total hours required 15 | total_hours_required = total_painting_hours + total_sculpture_hours 16 | 17 | # Calculate the number of days in the given months 18 | days_in_month = 30 # Approximate 19 | total_days = months * days_in_month 20 | 21 | # Calculate required hours per day 22 | required_hours_per_day = total_hours_required / total_days 23 | 24 | return required_hours_per_day 25 | 26 | def main(): 27 | # Define the parameters 28 | total_works = 20 29 | months = 6 30 | 31 | # Estimate number of paintings and sculptures (you can adjust as needed) 32 | paintings = 14 33 | sculptures = 6 34 | 35 | # Calculate the required hours per day for art classes 36 | required_hours_per_day = calculate_hours_per_day(paintings, sculptures, months) 37 | 38 | # Display the result 39 | print(f"To create {total_works} works (paintings and sculptures) in {months} months,") 40 | print(f"you need to spend approximately {required_hours_per_day:.2f} hours per day on art classes.") 41 | 42 | if __name__ == "__main__": 43 | main() 44 | --------------------------------------------------------------------------------