I think I'm almost there with my assignment. I'm trying to print:
"Hi John,(new line)
You have a 89.6% in your principle of programming course." However, when I print the below, it shows as follows:
"Hi John,(new line) You have a 89.4 % in your principle of programming course."
So could you guys help me how to put % sign without space? Are there better way to print these words?
student_name = input("Enter student's name: ")
course_name = input("Enter course name: ")
quizzes_weight = input("Enter quizzes weight: ")
projects_weight = input("Enter projects weight: ")
activities_weight = input("Enter activities weight: ")
attendance_weight = input("Enter attendance weight: ")
exams_weight = input("Enter exams weight: ")
quizzes_average = input("Enter quizzes average: ")
projects_average = input("Enter projects average: ")
activities_average = input("Enter activities average: ")
attendance_average = input("Enter attendance average: ")
exams_average = input("Enter exams average: ")
quizzes_weight = float(quizzes_weight)
projects_weight = float(projects_weight)
activities_weight = float(activities_weight)
attendance_weight = float(attendance_weight)
exams_weight = float(exams_weight)
quizzes_average = float(quizzes_average)
projects_average = float(projects_average)
activities_average = float(projects_average)
attendance_average = float(attendance_average)
exams_average = float(exams_average)
average_score_for_course = ((quizzes_weight * quizzes_average) +
(projects_weight * projects_average) + (activities_weight *
activities_average) + (attendance_weight * attendance_average) +
(exams_weight * exams_average)) * 100
print("Hi",student_name +",","\nYou have a",
average_score_for_course,"% in your", course_name,"course.")
for this assignment my above programming should produce output as below according to my input coding. For example:
Enter student's name: Ryan
Enter course name: Advanced Quantum Mechanics
Enter quizzes weight: .1
Enter projects weight: .2
Enter activities weight: .3
Enter attendance weight: .1
Enter exams weight: .3
Enter quizzes average: 1
Enter projects average: .85
Enter activities average: .9
Enter attendance average: .95
Enter exams average: .87
the output should be something like this:
Hi Ryan,
You have a 89.6% in your Advanced Quantum Mechanics course.