Question 28: If Elif Else Reading

📚 Study Time Tracker (Using Division)

Write a Python program to check how focused a student was based on how many minutes they studied and how many subjects they covered.


📝 Instructions:

  1. Ask for the student’s name and store it in a variable called name.

  2. Ask how many minutes they spent studying and store it in a variable called study_minutes (as an integer).

  3. Ask how many subjects they studied and store it in a variable called subjects (as an integer).

  4. Calculate the average time per subject using:

     
    average_time = study_minutes / subjects
  5. Use an if-elif-else structure to check the following:

    • If average_time is 30 minutes or more, print:
      “Awesome focus, [name]! You spent [average_time] minutes per subject. Great job!”

    • If average_time is between 15 and 29, print:
      “Nice work, [name]! You spent [average_time] minutes per subject. Keep it up!”

    • If average_time is less than 15, print:
      “Try to focus more, [name]. You only spent [average_time] minutes per subject. You can do better!”

Write what you are looking for, and press enter to begin your search!