Giter VIP home page Giter VIP logo

p4e_stage3's Introduction

Assignment

Rewrite your pay computation to give the employee 1.5 times the hourly rate for hours worked above 40 hours.

first, open payCalculator.py

Starter Code

This first line is provided for you

hrs = input("Enter Hours:")

Desired Output

Enter Hours: 45
Enter Rate: 10
Pay: 475.0

How to test

Run pytest. You want 2/4 tests to pass. The next two tests are for the next assignment!

Optional Assignment

After finishing the first assignment, rewrite your pay program using try and except. This way your program handles non-numeric input gracefully by printing a message and exiting the program.

Desired Output

The following shows two executions of the program:

Enter Hours: 20
Enter Rate: nine
Error, please enter numeric input
Enter Hours: forty
Error, please enter numeric input

How to Test

Run Pytest.

You should now have 4/4 passing tests!

p4e_stage3's People

Contributors

ryread avatar gearsandkeys avatar joeychantiny avatar jmchanti avatar ichbinryan 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.