WEEK 2: – THIS ASSIGNMENT HAS ALREADY BEEN COMPLETED. INCLUDED FOR REFERENCE.
This week you will review the techniques that Python uses to build data structures.
Part 1:
You are going to create the following:
Create a class with 4 private methods add, sub, mul, div and two public methods allInOneDict, and allinOneList
all methods will accept two parameters firstnumber, and secondnumber
Create a simple Python driver to test the above class.
get two numbers from the user
and print the results of all operations(add, sub, mul, div) from
allInOneDict, and allinOneList
Organize and comment your code. The outputs must be labeled like below (see sample output)
Note: methods of a class should not contain any UI functions
the driver should contain al UI and error trapping.
Part 2:
You are going to enhance the prior assignment by doing the following:
1) Limit the input range from -100 to 100 for each input number
2) Prevent dividing by zero
3) Instead of hard coding values from -100 to 100, let the user enter the range
WEEK 3:
This week you will learn about web development and restful web services.
Part 1
You going to create a restful application with multiple routes to perform the simple calculations from prior week
You are going to have at least 7 routes, the default route is instructions for how to use the application
4 routes (add, sub, mult, and div)
2 routes (allInOneDIct, and allInOneList
Part 2
Create an HTML form to accept the 2 numbers and perform all the calculation in part I
WEEK 4:
This week you will learn about templating. Templating is a modern way to update the HTML form dynamically.
Part 1
You going to create a restful application with multiple routes to perform the simple calculations from prior week
You are going to have at least 7 routes, the default route is instructions for how to use the application
4 routes (add, sub, mult, and div)
2 routes (allInOneDIct, and allInOneList
Part 2
Create an HTML Template to accept the 2 numbers and perform all the calculation in part I
Hints: See the sample code in the lesson
WEEK 5:
This week you will learn about databases and SQL and create CRUD functions in SQL.
Download DB Browser for SQLite
this is a visual tool to create and manage your SQLite databases
You are going to add two routes to the restful application (created from week 4), one to save the calculation to the database, the second is to retrieve the calculations from the database. (add a button on the form from each route)
You are welcome to add your own features
WEEK 6:
This lesson you will learn about microservices and multiprocessing. Microservices is way to divide the restful series to smaller services. Multiprocessing is how to be able to run more that one task at the same time.
You are going to create two services. The first one with contain add, sub, mul, and div. The second service will contain allInoneDict and allInOneList. The second service will call the first service. Make sure either HTML form or the template is working.