Click here to Skip to main content
15,888,263 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
programa que lea las calificaciones de 3 alumnos de los 4 meses del ciclo(una nota por mes) para luego mostar el promedio de cada alumno

Google:
program that reads the grades of 3 students from the 4 months of the cycle (one note per month) and then shows the average of each student


What I have tried:

recien estoy empezando en programar

Google:
I'm just starting to program
Posted
Updated 13-Jan-21 23:59pm
v2

This is an English language site, and we only accept questions in that language. In future, please use Google Translate if you you are not confident enough in your English to ask directly.

Calculating the average is easy, you know how to do it:
Add up all the grades for each student separately, then divide each total by the number of samples for that student.

Try it on paper first, then try converting that process to code.
 
Share this answer
 
Start here: The Python Tutorial — Python 3.8.5 documentation[^]
or here: Python Tutorial - Tutorialspoint[^]

There you'll find an example how to find average value of a list of values: Find average of a list in python - GeeksforGeeks[^]
 
Share this answer
 
Quote:
reads the grades of 3 students from the 4 months of the cycle
You might want to use Improve question to outline from what/where and how the data is going to be read - ie file, csv/tsv or keyboard

For now, I suggest you look at Python arrays, using 'for' to iterate them for example .. you could also use a simple 'driver' to get started, reading the number of elements and the elements themselves from the keyboard as in
# creating an empty list 
lst = [] 
  
# number of elements as input 
n = int(input("Enter number of elements : ")) 
  
# iterating till the range 
for i in range(0, n): 
    ele = int(input()) 
  
    lst.append(ele) # adding the element 
      
print(lst)
that gives you an array (lst) of 'string', it's simple enough to declare and add the data as integers, but that would be doing your homework for you.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900