"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"#Variable Declaration:\n",
"V1=2.0 #Voltage in volt\n",
"V2=3.0 #Voltage in volt\n",
"V3=4.0 #Voltage in volt\n",
"Rf=1000.0 #Feedback resistance in ohm\n",
"R1=Rf #Resistance value of the R1 is equal to Rf in ohm\n",
"R2=Rf #Resistance value of the R2 is equal to Rf in ohm \n",
"R3=Rf #Resistance value of the R3 is equal to Rf in ohm\n",
"R=Rf #Resistance value of the R is equal to Rf in ohm \n",
"\n",
"#Calculations:\n",
"Vo=-(Rf/R1)*(V1+V2+V3) #Calculating output voltage\n",
"\n",
"#Results:\n",
"print('Vo= %d V'%Vo)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Vo= -9 V\n"
]
}
],
"prompt_number": 32
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"