-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMessage generation
More file actions
13 lines (11 loc) · 964 Bytes
/
Message generation
File metadata and controls
13 lines (11 loc) · 964 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
names =input('Enter the names sepaerated by commas:').title().split(',') # get and process input for a list of names
assignments =input('Enter the assignment counts sepearated by commas:').split(',') # get and process input for a list of the number of assignments
grades =input('Enter the grades sepearated by commas:').split(',') # get and process input for a list of grades
# message string to be used for each student
# HINT: use .format() with this string in your for loop
message = "Hi {},\n\nThis is a reminder that you have {} assignments left to \
submit before you can graduate. You're current grade is {} and can increase \
to {} if you submit all assignments before the due date.\n\n"
# write a for loop that iterates through each set of names, assignments, and grades to print each student's message
for name , assignment , grade in zip(names,assignments,grades):
print(message.format(name , assignment , grade,int(grade) + int(assignment)*2))