Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part1: Write a python program to read the following XML file (shown in Figure1). Read the score of each class from score_data.xml, compute the GPA.

Part1:

Write a python program to read the following XML file (shown in Figure1).

Read the score of each class from score_data.xml, compute the GPA.

Add a gpa attribute for each class element.

Write the updated xml into a new file: output.xml (shown in Fiture2)

Upload your python source code file.

60

70

85

90

66

78

62

88

89

77

80

50

Figure 1: score_data.xml

60

70

85

90

66

78

62

88

89

77

80

50

Figure 2: output.xml

Part 2:

Write a python program to read the XML file output.xml (shown in Figure2).

Add 5 to each classs score, compute the GPA.

Compute the average GPA.

Add average element for average GPA of each student.

Write the updated xml into a new file: new_output.xml (shown in Fiture3)

65

70

90

95

71

78

67

93

94

82

85

55

Figure 3: new_output.xml

GPA

Percentage

Grade

GPA

Percentage

Grade

4.5

90-100

A+

2.5

67-69

C+

4.0

85-89

A

2.3

63-66

C

3.7

80-84

A-

2.0

60-62

C-

3.3

77-79

B+

1.0

50-59

D

3.0

73-76

B

0.0

<50

E

2.7

70-72

B-

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2014 Integration Services

Authors: Brian Knight, Devin Knight

1st Edition

1118850904, 9781118850909

More Books

Students also viewed these Databases questions

Question

What have been misses?

Answered: 1 week ago

Question

What do you notice have been hits in terms of meeting your mission?

Answered: 1 week ago

Question

What actions do you need to take now to get there?

Answered: 1 week ago