The circuit in the figure on the right shows a network of resistors
connected in series and in parallel.
(a) Determine the total resistance of the network.
(b) What is the current through the 3.00-Ω?
A 32.0-Ω resistor and a 20.0-Ω are connected in parallel, and the combination is applied
across a 240 V dc line.
(a) What is the resistance of the parallel combination?
(b) What is the total current through the parallel combination?
(c) What is the current through each resistor?
2.
Assume that each of the following statements applies to the same program.
a.
Write a statement that opens file
oldmast.dat
for
input; use an ifstream object called
inOldMaster.
b.
Write a statement that opens file
trans.dat
for reading
and writing data to it; use fstream object
transFile
that can read data from the file trans.dat
as well as write data to it.
c.
Write a statement that writes a record to the transfile. The record to store consist of an integer data
accountNumber
, and a floating point data
dollarAmount
Find the error(s) and show how to correct it(them) in each of the following.
a.
File
pets.dat
that stores its id, name, age and owner
of the pet is referred to by ofstream object
petfile
.
petfile>>pet_id>>pet_name>>pet_age>>pet_owner;
b.
The following statement should create an ifstream object
salesfile
that refers to the file
weeklysales.dat
that contains data about the id the
salesperson, total sales generated, and the
week number, read the data from the file and display it on the console output.
ifstream salesfile(“weeklysales.dat”);
int id,wk;
float sales;
salesfile>>id>>wk>>sales;
while (!salesfile.eof()){
cout<<id<<”\t”<<sales<<”\t”<<wk<<”\n”;
salesfile<<id<<wk<<sales;
}
a) 90.7 x 10-3 kg.m2
b) 41.6 x 10-3 kg.m2
c) 20 x 10-3 kg.m2
d) 29.6 x 10-3 kg.m2
What are the mass percentages of carbon and oxygen in carbon dioxide, ( CO2)?
A 100 μF capacitor is charged from a supply of 1000V, disconnected from the supply and then connected across an uncharged 50 μF capacitor.
Calculate the energy stored initially and finally in the
two capacitors. What conclusion do you draw from a
comparison of these results?
if a given integer in "N". write a program to print the right angled triangle pattern of "N" rows and there is a lhytopenus line using "/" of same number
-------
|
|
|
|
|
|
|
Q11: A travel company wants to fly a plane to the Bahamas. Flying the plane costs 5000 dollars. So far, 29 people have signed up for the trip. If the company charges 200 dollars per ticket, what is the profit made by the company?
Fill in values or arithmetic expressions for the variables below.
cost_of_flying_plane = ??? number_of_passengers = ??? price_of_ticket = ???
profit = ???
print('The company makes of a profit of {} dollars'.format(profit))
Q11b Out of the 29 people who took the flight, only 12 buy tickets to return
from the Bahamas on the same plane. If the flying the plane back also costs 5000 dollars, and does the company make an overall profit or loss? The company charges the same fee of 200 dollars per ticket for the return flight. (Optional)
Use an if statement to display the result.
Manny plans to save 1/14 of his salary each week. If his weekly salary is $420, find the amount he will save each week.