Question: 2) When taking data from the user, some validations (such as valid email address, valid phone number, etc.) must be performed. Write a function that

2) When taking data from the user, some validations (such as valid email address, valid phone number, etc.) must be performed. Write a function that take a string and return email if it is a valid email address, phone if it is a valid phone number, number if it is a valid numeric data, and date if it is a valid date.

Youre to decide which date format and phone number your function will be validating.

3) To add or register a new PV module, a manufacturer must fill out and submit a module detailed specifications (MDS) form. A sample to use in this PD is attached. Write a function that prompts the user to enter data from the MDS then returns the dictionary of these data.

Note: Use the same specifications for all the modules in the test results. Only the model numbers are different.

4) Each user must register with the portal. A user could be a Manufacturer, a Testing Lab, or any interested party. Write a function that takes a user registration and returns a dictionary of data. To register, a user provides the following information:

username & password to log in next time

first name

middle name (optional)

last name

company name

company type (test lab or manufacturer)

address

office phone number

cell phone number

email address

5) Main function

  1. Get the MDS data and instantiate:

A product (i.e. a new PV module) with the relevant data.

Note that it would require you to instantiate a manufacturer; which in turn will also require you to instantiate a contact person.

Insert the data into the relevant tables in the database

  1. Get the test results data file
  • Read in the content and store into the relevant tables in the database

  1. Retrieve data from the database and display the information below in a tabular format:

Manufacturer

Contact name

Contact Email

Cell Technology

Rated Power

Baseline

TC200

Damp Heat

HF10

Average Isc

Average Voc

Average Pmax

Average Pmax drop from Baseline average

0%

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!