Question

Python Coding: Write a computer program that stores and tracks information about high school students. The...

Python Coding:

Write a computer program that stores and tracks information about high school students. The first piece of information is what grade the student is in. Since this is for high school, the available values are 9, 10, 11, and 12. We also want to track the student’s GPA. Examples of GPAs are 2.2, 2.6, and 4.0. Finally, we want to track the letter grade that the student got on his or her final exam. These values are A, B, C, D, and F.

Using the programming language(s) that you select, write a program that creates variables to store these values. Devise with good names for these variables. In addition to creating the variables, set the values as follows:

Grade 9
GPA 3.5
Final grade B

When finished, your program should run without errors. It won’t do anything, because we have not included anything to be printed on the screen. So, when you run the program it should just terminate without errors.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

IF YOU HAVE ANY DOUBTS COMMENT BELOW I WILL BE THERE TO HELP YOU

ANSWER:

CODE:

id_nums = []
grades = []
gpas = []
final_grades = []

def student_data(id_num,grade,gpa,final_grade):
id_nums.append(id_num)
grades.append(grade)
gpas.append(gpa)
final_grades.append(final_grade)
  
  
while(1):
print "Do you want enter the student data or view?"
choice = raw_input("Enter you choice (E - Enter/V - View): ")
if(choice == 'E'):
print "Valid data specifications: "
print "1). Id must be of 6 digits"
print "2). Grade must be in between 9-12 both included"
print "3). GPA must be less than 10.00"
print "4). Final grade must be one of A, B, C, D or F"
  
id_num = int(raw_input("Enter student Id number: "))
grade = int(raw_input("Enter grade: "))
gpa = float(raw_input("Enter gpa: "))
final_grade = raw_input("Enter final grade: ")
  
if((id_num<=99999 or id_num>=1000000) or (grade<9 and grade>12) or (gpa<0.0 and gpa>10.00) or (final_grade not in ('A','B','C','D','F'))):
print "Enter valid data as specified "
continue
else:
student_data(id_num,grade,gpa,final_grade)
  
elif(choice == 'V'):
print "Enter six digit Id number only.."
id_num = int(raw_input("Enter student Id number to serach: "))
if(id_num>99999 and id_num<1000000):
index = id_nums.index(id_num)
print "Student grade: ",grades[index]
print "Student GPA: ",gpas[index]
print "Student final grade: ",final_grades[index]
else:
print "Enter valid data.. "
continue

OR

CODE:

source code:

RATE THUMBSUP PLEASE

Add a comment
Know the answer?
Add Answer to:
Python Coding: Write a computer program that stores and tracks information about high school students. The...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a C++ program to store and update students' academic records in a binary search tree....

    Write a C++ program to store and update students' academic records in a binary search tree. Each record (node) in the binary search tree should contain the following information fields:               1) Student name - the key field (string);               2) Credits attempted (integer);               3) Credits earned (integer);               4) Grade point average - GPA (real).                             All student information is to be read from a text file. Each record in the file represents the grade information on...

  • [15 marks] Suppose that students enrolled in one course are required to take four tests, and...

    [15 marks] Suppose that students enrolled in one course are required to take four tests, and each student’s final grade for this course is the average of his/her grades of these four tests. This question asks you to write a program that can be used to compute the lowest final grade, highest final grade and the average final grade. General Requirements: Use a5q1.c as the name of your C source code file. We will use the following command on bluenose...

  • In C++ Write a menu driven C++ program to read a file containing information for a list of Students, process the data, t...

    In C++ Write a menu driven C++ program to read a file containing information for a list of Students, process the data, then present a menu to the user, and at the end print a final report shown below. You may(should) use the structures you developed for the previous assignment to make it easier to complete this assignment, but it is not required. Required Menu Operations are: Read Students’ data from a file to update the list (refer to sample...

  • Principles of Computer Science

    Question First, you need to design, code in Java, test and document a base class, Student. The Student class will have the following information, and all of these should be defined as Private: A. Title of the student (eg Mr, Miss, Ms, Mrs etc) B. A first name (given name) C. A last name (family name/surname) D. Student number (ID) – an integer number (of type long) E. A date of birth (in day/month/year format – three ints) - (Do NOT use the Date class from...

  • C++ The programming language is c++ our program using the following data Mary Smith Green walley...

    C++ The programming language is c++ our program using the following data Mary Smith Green walley Thul Bool Gauteng ) Please key is the n ot your Ter in your mark for Mathematics Ey in your mark for use orientation Key in your mark for watory Wer in your work for Computer literacy Te in r for at e Jobs Africa School: King College 9/11 - Average Year Wark53.67 with label and code The T a QUESTION 2: (40) Suppose...

  • ANY HELP PLEASE. PLEASE READ THE WHOLE INSTRUCTION THANK YOU Write a program GS.java that will...

    ANY HELP PLEASE. PLEASE READ THE WHOLE INSTRUCTION THANK YOU Write a program GS.java that will be responsible for reading in the names and grades for a group of students, then reporting some statistics about those grades. The statistics to be gathered are the number of scores entered, the highest score and the name(s) of the student(s) who earned that score, the lowest score and the name(s) of the student(s) who earned that score, and the average score for the...

  • In python, write the following program, high school question, please keep simple. When I submitted the...

    In python, write the following program, high school question, please keep simple. When I submitted the solution, I get an error as 'wrong answer'. Please note below the question and then the solution with compiler errors. 7.2 Code Practice: Question 2 Instructions Write a program to generate passwords. The program should ask the user for a phrase and number, and then create the password based on our special algorithm. The algorithm to create the password is as follows: If the...

  • python 3 question Project Description Electronic gradebooks are used by instructors to store grades on individual assignments and to calculate students’ overall grades. Perhaps your instructor uses gr...

    python 3 question Project Description Electronic gradebooks are used by instructors to store grades on individual assignments and to calculate students’ overall grades. Perhaps your instructor uses gradebook software to keep track of your grades. Some instructors like to calculate grades based on what is sometimes called a “total points” system. This is the simplest way to calculate grades. A student’s grade is the sum of the points earned on all assignments divided by the sum of the points available...

  • C++ PROGRAM ONLY! For this lab you need to write a program that will read in...

    C++ PROGRAM ONLY! For this lab you need to write a program that will read in two values from a user and output the greatest common divisor (using a recursive implementation of the Euclidean algorithm) to a file. In Lab #3, you implemented this program using an iterative method. Greatest Common Divisor In mathematics, the greatest common divisor (GCD) of two or more integers (when at least one of of them is zero then the larger value is the GCD....

  • Exercise #1: Write a C program that contains the following steps (make sure all variables are...

    Exercise #1: Write a C program that contains the following steps (make sure all variables are int). Read carefully each step as they are not only programming steps but also learning topics that explain how functions in C really work. Ask the user for a number between 10 and 99. Write an input validation loop to make sure it is within the prescribed range and ask again if not. Commenting out the existing coding, write the code to divide a...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT