Code Monkey home page Code Monkey logo

automatedalarm's Introduction

automatedAlarm()

your alarm clock can be programmed by Python provided you can write a function to automate it.

requirements:

You want to make sure your alarm is set for...

  • If it's a standard school day...
    • set it for 7:00 on Mondays, Tuesdays, Thursdays, and Fridays
    • set it for 7:30 on Wednesdays
  • If there is no school on a weekday (it's summer, a holiday, or some other break),
    • then it's 9:30 on Mondays (no school)
    • or 8:30 on all other weekdays (again, no school)
  • Always set the alarm for 9:00am on the weekends (regardless of the day)

Inputs:

  • automatedAlarm() receives two inputs (string and boolean): day and noSchool
    • day is a string ("Monday", "Tuesday", "Wednesday"...)
    • noSchool is a boolean
      • True = if it's a vacation, holiday, or summer
      • False = if it's a standard school day

Output:

automatedAlarm() returns one output (a string): time (e.g. "8:00")

Examples: inputs => output/s

  • Wednesday True => 8:30
  • Monday True => 9:30
  • Monday False => 7:00
  • Wednesday False => 7:30
  • Saturday True => 9:00
  • Saturday False => 9:00
  • Friday False => 7:00
  • Friday True => 8:30

automatedalarm's People

Contributors

andrewaldasoro avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.