1. Homepage
  2. Programming
  3. COMP 1012 Programming Fundamentals and Applications Assignment 3: Interpolation, string manipulation

COMP 1012 Programming Fundamentals and Applications Assignment 3: Interpolation, string manipulation

Engage in a Conversation
Python Interpolationstring manipulationCOMP 1012Programming Fundamentals and Applications

COMP 1012 Programming Fundamentals and Applications Assignment 3

- Task 1 – (20 Points)

Given counting.csv in the Data folder, please write a Python program to estimate the counts 2 minutes and 30 seconds after each timestamp. Then, store the counts for every 2 minutes and 30 seconds in a csv file named results_T1.csv in the Results folder. Plot the counts for every 2 minutes and 30 seconds and save as a png file named result_plot_T1.png in the results folder. For example, supposed we have CourseNana.COM

Time Counts
9/2/2022 7:35:00 AM 6
9/2/2022 7:40:00 AM 8
9/2/2022 7:45:00 AM 10
We are going to estimate the counts at 9/2/2022 7:37:30 AM, 9/2/2022 7:42:30 AM, and 9/2/2022 7:47:30 AM, respectively, and store it as a csv file. Time Counts
9/2/2022 7:35:00 AM 6
9/2/2022 7:37:30 AM Estimated counts
9/2/2022 7:40:00 AM 8
9/2/2022 7:42:30 AM Estimated counts
9/2/2022 7:45:00 AM 10
9/2/2022 7:47:30 AM Estimated counts

Requirements: Please use pandas to read and write the csv file. Tips: You can use interpolation methods provided by NumPy or SciPy to estimate the counts. You can also try using linear regression in scikit-learn for the estimation (see the reference: https://scikitlearn.org/stable/modules/generated/sklearn.linear_model.LinearRegression.html and https://scikitlearn.org/stable/auto_examples/linear_model/plot_ols.html). CourseNana.COM

- Task 2 – (40 Points)

Please write a Python program to CourseNana.COM

  1. Ask user to input a string from keyboard. The string must contain at least a ‘\’, a space, a lowercase letter, an upper-case letter, and a number. If the input string does not satisfy the rule, ask the user to re-input.
  2. Print the obtained string.
  3. Replace all the ‘\’ by ‘n’ in the obtained string.
  4. Replace all the lower-case letters by ‘\’ in the obtained string.
  5. Replace all the upper-case letters by ‘t’ in the obtained string.
  6. Replace all the numbers by ‘*’ in the obtained string.
  7. Print the new string.

Tips: Since all string manipulation is replacing, the length of the string after replacing must be the same as the original one. Be careful about escape characters. You can check string methods in https://www.w3schools.com/python/python_ref_string.asp. CourseNana.COM

- Task 3 – (40 Points)

Please write a Python program to CourseNana.COM

  1. Ask the user to input ?? float number and store in a list named nums, where ?? ≥ 3.
  2. Return the output list named res where the length of res is the same as the nums, and res[i] is equal to the product of the elements of nums excluding nums[i] where 0 < ?? < ??????(??????).
  3. Print every nums[i] and format the output to keep 4 decimal places.

Requirement: CourseNana.COM

  1. Division is not allowed.
  2. Nested loop is not allowed.

Tips: Since all string manipulation is replacing, the length of the string after replacing must be the same as the original one. Be careful about escape characters. You can check string methods in https://www.w3schools.com/python/python_ref_string.asp. CourseNana.COM

- Submission Requirement

  1. Submit on time.
  2. Name the program of Task 1 by studentID_T1.py in which studentID is your student ID. For example, if your student ID is 12345678g, name the program as 12345678g_T1.py.
  3. Name the program of Task 2 by studentID_T2.py in which studentID is your student ID. For example, if your student ID is 12345678g, name the program as 12345678g_T2.py.
  4. Name the program of Task 3 by studentID_T3.py in which studentID is your student ID. For example, if your student ID is 12345678g, name the program as 12345678g_T3.py.
  5. Put studentID_T1.py, studentID_T2.py and studentID_T3.py into a folder named by your student ID.
  6. Create a folder named Data in the folder student ID and put counting.csv in the Data folder.
  7. Create a folder named Results in the folder student ID.
  8. studentID_T1.py should read the counting.csv in the Data folder as input of the program and the outputs should be automatically saved in the Results folder.
  9. Zip the folder and submit the zip file via the Blackboard.
    • End –

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
Python代写, Interpolation代写,string manipulation代写,COMP 1012代写,Programming Fundamentals and Applications代写,Python代编, Interpolation代编,string manipulation代编,COMP 1012代编,Programming Fundamentals and Applications代编,Python代考, Interpolation代考,string manipulation代考,COMP 1012代考,Programming Fundamentals and Applications代考,Pythonhelp, Interpolationhelp,string manipulationhelp,COMP 1012help,Programming Fundamentals and Applicationshelp,Python作业代写, Interpolation作业代写,string manipulation作业代写,COMP 1012作业代写,Programming Fundamentals and Applications作业代写,Python编程代写, Interpolation编程代写,string manipulation编程代写,COMP 1012编程代写,Programming Fundamentals and Applications编程代写,Pythonprogramming help, Interpolationprogramming help,string manipulationprogramming help,COMP 1012programming help,Programming Fundamentals and Applicationsprogramming help,Pythonassignment help, Interpolationassignment help,string manipulationassignment help,COMP 1012assignment help,Programming Fundamentals and Applicationsassignment help,Pythonsolution, Interpolationsolution,string manipulationsolution,COMP 1012solution,Programming Fundamentals and Applicationssolution,