mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-04 16:57:32 +08:00
MAINT: Updated f-string method (#6230)
* MAINT: Used f-string method Updated the code with f-string methods wherever required for a better and cleaner understanding of the code. * Updated files with f-string method * Update rsa_key_generator.py * Update rsa_key_generator.py * Update elgamal_key_generator.py * Update lru_cache.py I don't think this change is efficient but it might tackle the error as the error was due to using long character lines. * Update lru_cache.py * Update lru_cache.py Co-authored-by: cyai <seriesscar@gmail.com> Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
@ -111,7 +111,7 @@ def calculate_average_times(
|
||||
for i in range(no_of_processes):
|
||||
total_waiting_time = total_waiting_time + waiting_time[i]
|
||||
total_turn_around_time = total_turn_around_time + turn_around_time[i]
|
||||
print("Average waiting time = %.5f" % (total_waiting_time / no_of_processes))
|
||||
print(f"Average waiting time = {total_waiting_time / no_of_processes:.5f}")
|
||||
print("Average turn around time =", total_turn_around_time / no_of_processes)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user