diff options
author | Zeno | 2017-03-21 23:08:18 +0800 |
---|---|---|
committer | Zeno | 2017-03-21 23:08:18 +0800 |
commit | 110bbe95dce9536514aa96261d47e96d5811e158 (patch) | |
tree | 2df6dbc0f0a41c9e654d2a6f6556e101d6050987 | |
parent | 4a1687069010901f6be46d721158d8313c64cfce (diff) | |
download | aur-110bbe95dce9536514aa96261d47e96d5811e158.tar.gz |
adjust decimals to the form: x.xx
-rwxr-xr-x | cscore | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -137,8 +137,10 @@ class Score: if (self.cur_gpa == 0): print("No avilible course this semester for now") else: - print("GPA of this semester : " + str(self.cur_gpa)) - print("GPA of all courses : " + str(self.gpa)) + print("GPA of this semester : ", end="") + print('%.2f' % (self.cur_gpa)) + print("GPA of all courses : ", end="") + print('%.2f' % (self.gpa)) except Exception as e: print(e) self.run(retry_times - 1) |