<?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>Forem: CAT-CMS</title>
    <description>The latest articles on Forem by CAT-CMS (@catcms).</description>
    <link>https://forem.com/catcms</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%2F354894%2F7a36e349-bb28-48cd-9cd2-9cb0843b9c4b.png</url>
      <title>Forem: CAT-CMS</title>
      <link>https://forem.com/catcms</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/catcms"/>
    <language>en</language>
    <item>
      <title>Find resistance of wheatstone bridge</title>
      <dc:creator>CAT-CMS</dc:creator>
      <pubDate>Sat, 12 Oct 2024 15:23:52 +0000</pubDate>
      <link>https://forem.com/catcms/find-resistance-of-wheatstone-bridge-1a32</link>
      <guid>https://forem.com/catcms/find-resistance-of-wheatstone-bridge-1a32</guid>
      <description>&lt;h1&gt;
  
  
  Find unknown resistance of Wheatstone bridge, Rx(=R in code)
&lt;/h1&gt;

&lt;h1&gt;
  
  
  The equation of Rx is below.
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Rx = Rk * R2 / R1
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Proportion of R2 and R1 is R2_R1 in code.
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Making function.
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def Find_the_resistance (Rk, R2_R1) :
    R = Rk * R2_R1
    d.append(R)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  I put experimental values in lists, a and b.(9 times experiments)
&lt;/h1&gt;

&lt;h1&gt;
  
  
  List c has theoretical values.
&lt;/h1&gt;

&lt;h1&gt;
  
  
  List d has the result of the function
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Error rate : (experimental value - theoretical value) / theoretical value * 100
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a = [147, 464, 14, 47, 2180, 8100, 5570, 1470, 4620]
b = [10, 10, 100, 100, 0.1, 0.1, 0.1, 1, 1]
c = [1470, 4520, 1470, 4520, 217, 810, 557, 1470, 4520]
d = []
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  range(starting number, ending number). It doesn't include the ending number but ending number - 1
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Computer counts numbers from 0 not 1. Don't forget it!(I said it for myself. XD)
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for i in range(0, 9) :
    Find_the_resistance(a[i], b[i])
    print((d[i] - c[i]) / c[i] * 100)
    i = i+1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>python</category>
      <category>assignment</category>
      <category>calculate</category>
    </item>
  </channel>
</rss>
