Task 2 The relationship between the voltage applied across a resistor and the current flowing through the resistor is given by Ohm's law, which can be expressed in the following mathematical form: V = I× R Where: | • V is the voltage across the resistor (volts), V • I is the current flowing through the resistor (amperes), • R is the resistance (ohms). The following table gives data for the current flowing through a resistor: S. No. Current 1 0.1 0.2 22 0.5 35 4 5 6 7 8 9 10 1.0 1.5 2.0 3.0 5.0 7.5 10.0 (Amperes) a) Write a script that will prompt the user for the value of the resistance and determine the voltage across the resistor for each current in the table. The script will print the result for each current in the following tabular format: Example: S.No. Current (Amperes) Voltage (Volts) 1. 0.1 1.0 2. 0.5 2.0 10. 10.0 100.0 b) Plot Voltage vs Current for the given resistance. c) Prompt the user a second time for a different value of resistance and plot the voltage vs current in the same graph as in part (b) for both resistances. (Hint: Use the subplot command and don't forget to label your graphs) R

Delmar's Standard Textbook Of Electricity
7th Edition
ISBN:9781337900348
Author:Stephen L. Herman
Publisher:Stephen L. Herman
Chapter23: Resistive-inductive-capacitive Series Circuits
Section: Chapter Questions
Problem 1RQ: What is the phase angle relationship of current and the voltage dropped across a pure resistance?
icon
Related questions
Question
Please help me and provide screen for code
Task 2
The relationship between the voltage applied across a resistor and the current flowing through
the resistor is given by Ohm's law, which can be expressed in the following mathematical form:
V = I× R
Where:
|
•
V is the voltage across the resistor (volts),
V
•
I is the current flowing through the resistor (amperes),
•
R is the resistance (ohms).
The following table gives data for the current flowing through a resistor:
S. No.
Current
1
0.1
0.2
22
0.5
35
4
5
6
7
8
9
10
1.0
1.5
2.0
3.0
5.0
7.5
10.0
(Amperes)
a) Write a script that will prompt the user for the value of the resistance and determine the
voltage across the resistor for each current in the table. The script will print the result
for each current in the following tabular format:
Example:
S.No.
Current (Amperes)
Voltage (Volts)
1.
0.1
1.0
2.
0.5
2.0
10.
10.0
100.0
b) Plot Voltage vs Current for the given resistance.
c) Prompt the user a second time for a different value of resistance and plot the voltage vs
current in the same graph as in part (b) for both resistances.
(Hint: Use the subplot command and don't forget to label your graphs)
R
Transcribed Image Text:Task 2 The relationship between the voltage applied across a resistor and the current flowing through the resistor is given by Ohm's law, which can be expressed in the following mathematical form: V = I× R Where: | • V is the voltage across the resistor (volts), V • I is the current flowing through the resistor (amperes), • R is the resistance (ohms). The following table gives data for the current flowing through a resistor: S. No. Current 1 0.1 0.2 22 0.5 35 4 5 6 7 8 9 10 1.0 1.5 2.0 3.0 5.0 7.5 10.0 (Amperes) a) Write a script that will prompt the user for the value of the resistance and determine the voltage across the resistor for each current in the table. The script will print the result for each current in the following tabular format: Example: S.No. Current (Amperes) Voltage (Volts) 1. 0.1 1.0 2. 0.5 2.0 10. 10.0 100.0 b) Plot Voltage vs Current for the given resistance. c) Prompt the user a second time for a different value of resistance and plot the voltage vs current in the same graph as in part (b) for both resistances. (Hint: Use the subplot command and don't forget to label your graphs) R
Expert Solution
steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Delmar's Standard Textbook Of Electricity
Delmar's Standard Textbook Of Electricity
Electrical Engineering
ISBN:
9781337900348
Author:
Stephen L. Herman
Publisher:
Cengage Learning