Answer:
def average_temp(s): f = open("s.txt","r") for line in f: myList = line.split(",") print(myList[0],end=",") t=0 for i in range(1,25,1): t += int(myList[i]) t /= 24 print(t) f.close()
def average_temp(s):
f = open("s.txt","r")
for line in f:
myList = line.split(",")
print(myList[0],end=",")
t=0
for i in range(1,25,1):
t += int(myList[i])
t /= 24
print(t)
f.close()
Explanation:
I used Python for the solution.
Answer:
class fan{
private String model;
private boolean isOn;
//Constructor goes here
public fan(String model, boolean isOn) {
this.model = model;
this.isOn = isOn;
}
// An additional method goes here
public boolean turnOn(boolean yes){
if(yes) {
this.isOn=true;
System.out.println("Fan is blowing");
return true;
}
else
this.isOn=false;
System.out.println("Fan is off");
return false;
}
}
Explanation:
Demonstrating the working of the class in a main method. Below is a complete code
public class fanTest {
public static void main(String[] args) {
fan fan1 = new fan("Binatone", false);
fan1.turnOn(false);
}
}
class fan{
private String model;
private boolean isOn;
//Constructor goes here
public fan(String model, boolean isOn) {
this.model = model;
this.isOn = isOn;
}
// An additional method goes here
public boolean turnOn(boolean yes){
if(yes) {
this.isOn=true;
System.out.println("Fan is blowing");
return true;
}
else
this.isOn=false;
System.out.println("Fan is off");
return false;
}
}
If you have machines doing jobs, fewer staff is needed, therefore the costs are LESS.
Hope I helped!
Answer:
Webpage Layouts where finally designed using html code
Explanation: