This commit is contained in:
Stephan Raabe
2023-06-19 15:04:00 +02:00
parent 11a7b9b1b1
commit ad1ea94623
5 changed files with 47 additions and 30 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
yay -Scc
su -c 'pacman -Qtdq | pacman -Rns -'
su /c 'pacman -Qqd | pacman -Rsu -'
su -c 'pacman -Qqd | pacman -Rsu -'
+6 -4
View File
@@ -17,14 +17,16 @@ from rich.prompt import FloatPrompt
# Show prompts
console = Console()
num1 = FloatPrompt.ask("Original value")
num1 = FloatPrompt.ask("Old value")
num2 = FloatPrompt.ask("New value")
# printing the sum in float
# Calculate the growth rate
gr = ((num2-num1)/num1)
percentage = "{:.2%}".format(gr)
# Print result to the console
console.print(percentage, style="bold")
# copy result into the system clipboard
# Copy result into the system clipboard
pyperclip.copy(percentage)
print("Output has been copied to the clipboard!")
print("Result has been copied to the clipboard!")