<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: JimDarker</title>
    <description>The latest articles on DEV Community by JimDarker (@jimdarker).</description>
    <link>https://dev.to/jimdarker</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F806924%2F43cae060-ccd4-4245-9fee-89921b3706c0.png</url>
      <title>DEV Community: JimDarker</title>
      <link>https://dev.to/jimdarker</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jimdarker"/>
    <language>en</language>
    <item>
      <title>VAT Calculator</title>
      <dc:creator>JimDarker</dc:creator>
      <pubDate>Mon, 31 Jan 2022 16:19:13 +0000</pubDate>
      <link>https://dev.to/jimdarker/vat-calculator-cp0</link>
      <guid>https://dev.to/jimdarker/vat-calculator-cp0</guid>
      <description>&lt;p&gt;This is a VAT calculator that I made in Python3. It has the ability to add or remove VAT (20%) to any numerical value provided. The result then automatically copies to clipboard so that the value can be used where required. It is programmed to loop so that it can be used with as many values as needed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--C1YFfyMf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tgerkputcg597oh10lpa.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--C1YFfyMf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tgerkputcg597oh10lpa.PNG" alt="VAT calculator" width="471" height="396"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the code I used.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import pyperclip

vat = 1.2


def remove_vat(x, y):
    return x / y
def add_vat(x , y):
    return x * y

while True:
    print("#### VAT Calculator ####")
    num = float(input("Enter Amount: "))

    print("Choose Operation:")
    print("1. Remove VAT")
    print("2. Add VAT")

    choice = input("Enter Choice(1/2):")
    result = 0

    if choice =='1':
        result = remove_vat(num , vat)
    elif choice == '2':
        result = add_vat(vat , num)
    else:
        print("Invalid Input")

    print(round(result , 2))
    pyperclip.copy(round(result , 2))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I was inspired to make this because I was using an &lt;a href="https://www.online-vat-calculator.co.uk/"&gt;online VAT calculator&lt;/a&gt; which was effective but I believed that I could speed up my workflow by making this simple tool and did not want to rely on an internet connection to be able to use it.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
