Write a Python program to check how focused a student was based on how many minutes they studied and how many subjects they covered.
Ask for the student’s name and store it in a variable called name
.
Ask how many minutes they spent studying and store it in a variable called study_minutes
(as an integer).
Ask how many subjects they studied and store it in a variable called subjects
(as an integer).
Calculate the average time per subject using:
average_time = study_minutes / subjects
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!”
We’re always looking for international STEM educators to join our team. If you are interested, please send us a mail and we’ll get back to you!
If you have any questions, kindly send us a mail. Don’t forget to follow and like all our social accounts to get updates on competitions!