Problem: Write a Python program that reads from an input file given by a user students information after a summer semester which allow students to take two courses. The program will calculate the accumulated semester grade point average (GPA) according to the courses grades and the number of credit hours of the courses. The GPA scores are shown in table 1. The accumulate GPA is calculated as the following equation GPAcourse 1 • Creditscourse 1 + GPAcourse 2 Credits.course 2 A Creditscourse1+ Creditscourse 2 Accumulate GPA = The input file contains student id and student name in the first line. The rest lines contain courses information (course code, course credit hours, student grade). Suppose the input files always in the same format as in the given sample inputs in Figures 2 and 3. The program should display the result in an output file with name "result_ID.txt" where ID is the student Id. Your output files should be in the same format as shown in the given sample outputs in Figures 2 and 3. The first line contains student name and id followed by a table of courses information and at the end the accumulated GPA. Figure I shows a sample run on a console window. Table 1 GPA Scores Grade A GPA 4.0 B 3.0 2.0 D 1.0 F 0.0 Enter the file name of a students: st 15577.txt The output file named 'result 15577.txt'has been successfully created. Figure 1 Console window 215577 t Notepad File Edit Format View Help 15577ar Mohammed Al zidi ENGEe:3:0 MATHI01:3:D resut 15577 tt- Notepad Fle Edit Format View Help student ID: 15577 Student Nane: Anar ohammed Al zidi Course Code ENGE370 MATHI01 Credits Grade Total Attempted: 6 CUM GPA: 1.50 Figure 2 Samplel input file (left) and output file (right) a4.2410t File Edit Format View Help 23410 Maryan Abdullah Al Ari student ID: 23410 student Nane: Maryan Abdullah Al Ari MATH2202:3 ARAB1100:2IA result 23410.bt- Notepad Fle Edit Format View Help Course Code Credits Grade MATH2202 ARAB1100 Total Attempted: s CUn GPA: 3.40 Figure Sample2 input file (left) and output file (right)
Problem: Write a Python program that reads from an input file given by a user students information after a summer semester which allow students to take two courses. The program will calculate the accumulated semester grade point average (GPA) according to the courses grades and the number of credit hours of the courses. The GPA scores are shown in table 1. The accumulate GPA is calculated as the following equation GPAcourse 1 • Creditscourse 1 + GPAcourse 2 Credits.course 2 A Creditscourse1+ Creditscourse 2 Accumulate GPA = The input file contains student id and student name in the first line. The rest lines contain courses information (course code, course credit hours, student grade). Suppose the input files always in the same format as in the given sample inputs in Figures 2 and 3. The program should display the result in an output file with name "result_ID.txt" where ID is the student Id. Your output files should be in the same format as shown in the given sample outputs in Figures 2 and 3. The first line contains student name and id followed by a table of courses information and at the end the accumulated GPA. Figure I shows a sample run on a console window. Table 1 GPA Scores Grade A GPA 4.0 B 3.0 2.0 D 1.0 F 0.0 Enter the file name of a students: st 15577.txt The output file named 'result 15577.txt'has been successfully created. Figure 1 Console window 215577 t Notepad File Edit Format View Help 15577ar Mohammed Al zidi ENGEe:3:0 MATHI01:3:D resut 15577 tt- Notepad Fle Edit Format View Help student ID: 15577 Student Nane: Anar ohammed Al zidi Course Code ENGE370 MATHI01 Credits Grade Total Attempted: 6 CUM GPA: 1.50 Figure 2 Samplel input file (left) and output file (right) a4.2410t File Edit Format View Help 23410 Maryan Abdullah Al Ari student ID: 23410 student Nane: Maryan Abdullah Al Ari MATH2202:3 ARAB1100:2IA result 23410.bt- Notepad Fle Edit Format View Help Course Code Credits Grade MATH2202 ARAB1100 Total Attempted: s CUn GPA: 3.40 Figure Sample2 input file (left) and output file (right)
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 5 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education