I. Creating a file called conversionutils.js. In this file, code the following functions:
a. centi_to_milli: Takes a value for centimeters and returns the value in millimeters.
b. meter_to_centi: Takes a value for meters and returns the value in centimeters.
c. kilo_to_meter: Takes a value for kilometers and returns the value in meters.
d. inch_to_centi: Takes a value for inches and returns the value in centimeters.
e. feet_to_centi: Takes a value for feet and returns the value in centimeters.
f. yard_to_meter: Takes a value for yards and returns the value in meters.
g. mile_to_meter: Takes a value for miles and returns the value in meters.
h. mile_to_kilo: Takes a value for miles and returns the value in kilometers.
Make sure to export your functions to make this a module.
II. Create a file called conversion.js. Start by importing your conversionutils module. When I run the conversion
Please answer these questions in Javascript using const readline = require('readline') instead of readline-sync
Step by stepSolved in 3 steps with 2 images
- *The following needs to be in python For this application, you will need to create a Python application that reads the sales for 12 months from a file and calculates the total yearly sales as well as the average monthly sales. In addition, this program should let the user edit the sales for any month. Jan 14317 Feb 3903 Mar 1073 Apr 3463 May 2429 Jun 4324 Jul 9762 Aug 15578 Sep 2437 Oct 6735 Nov 88 Dec 2497 Step 1 Define a display_title() function and have it use the print() to show the text: [FirstName] [LastName]'s Monthly Sales Replace the placeholders with your own first and last name add a space using the print() Define a display_menu() function and have it Use the print() function several times to show the following text with a space after: COMMAND MENUmonthly - View monthly salesyearly - View yearly summaryedit - Edit sales for a monthexit - Exit program Step 2 Define a main() function Call the display_title() function and the…arrow_forwardRun the program below, which creates “Dates” in the HW library. You will need to change the input statement to account for the format of the raw data. Add the following to this data step: Using the yrdif function to add a variable called “Agetoday”, which is the age today. Use proc print to list all the variables to the output window. Remember to format all dates for output purposes. data HW.dates; input Subj $ DOB ; datalines; 001 11Nov06 002 25May07 003 25Dec06 ; run; proc; run;arrow_forwardpython Now write another program that reads the text file created in the program above and calculates the user's weekly pay. The program should begin by prompting the user for the regular hourly pay rate. The program should then loop through the file and report the days and hours worked. The program should finish by calling a custom void function named calc_pay that calculates and prints the weekly pay, including overtime, if applicable. By law, weekly hours in excess of 40 should be paid at 1.5 times the regular hourly rate. The calc_pay function takes two arguments, total hours and hourly pay rate, and it must be imported from a separate module file. Note that three outputs are required for the pay.Sample Output 1Enter your hourly pay rate 25.00Here are your hours this weekMonday hours : 10.0Tuesday hours : 8.0Wednesday hours : 12.0Friday hours : 12.0Saturday hours : 8.0You worked 50.0 hours this weekYou worked 10.0 hours overtimeYour hourly pay rate is $25.00 Regular pay :…arrow_forward
- Please answer this question in Javascript using const readline = require('readline'); 1. Creating a file called conversionutils.js. In this file, code the following functions: a. centi_to_milli: Takes a value for centimeters and returns the value in millimeters. b. meter_to_centi: Takes a value for meters and returns the value in centimeters. c. kilo_to_meter: Takes a value for kilometers and returns the value in meters. d. inch_to_centi: Takes a value for inches and returns the value in centimeters. e. feet_to_centi: Takes a value for feet and returns the value in centimeters. f. yard_to_meter: Takes a value for yards and returns the value in meters. g. mile_to_meter: Takes a value for miles and returns the value in meters. h. mile_to_kilo: Takes a value for miles and returns the value in kilometers. Make sure to export your functions to make this a module. 2. Create a file called conversion.js. Start by importing your conversionutils module. When…arrow_forwardHi, I need to solve this problem with C++ programming language using Visual Studio. Thank you.arrow_forwardTurn the following code into a procedure. Pass the input file and the amount of PM 10 to the procedure. It will print the city name and the pollution values for all cities that have that much PM 10 pollution or more.arrow_forward
- This file requires a main function and two custom functions about circles. Both functions take the radius of a circle as an argument. One function returns the area of the circle. The other void function prints the circumference of a circle to three decimal places. The main function should prompt the user for the radius (as a float) and execute the custom functions. The value returned by the area function should be printed accurate to four decimal places. Use the math module to get the value of pi.Sample Output program5_3.pyThis program should import program5_2 as a module. The main function should prompt the user for the radius (as a float) and execute the imported functions. Outputs should display the same number of decimals as program5_2.py.arrow_forward9b_act2. Please help me answer this in python programming.arrow_forwardCreate the following, in Python: You have a business that cleans floors in commercial space and offices. You charge customers $0.45 per square yard, and some customers require multiple cleanings every month. You need two custom functions for your business. The first function takes a floor's length and width in feet and returns the area in square yards. The second void function takes the area, charge per square yard, and number of monthly cleanings as arguments and prints the cleaning cost. This latter function uses selection (if...else) logic to print different output for single and multiple monthly cleanings (see Sample Outputs). Use a properly named constant for the charge per square yard, too.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education