about | help | code help+videos | done | prefs |
Write a Python function that gets the current period number and returns it as an integer. Valid period numbers are 1 through 7 inclusive. If the time is not during the school day, then return 0. If it is during passing time, return -1. If it is during common lunch, return -2. If it is homeroom or common tutorial, return -3. The minute a period ends should count as passing time. NOTE: The hour will be in military time, so an hour of 13 means 1 PM, for example. get_period_number(9, 54) → 3 get_period_number(10, 0) → 3 get_period_number(10, 1) → 3 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 100
Copyright Nick Parlante 2017 - privacy