Answer: 2)Fishbone/lshikawa
Explanation: Fishbone diagrams are those diagrams which help in the identification of the problem causing factors and reasons behind.This diagrams find the roots of the problem to solve it. Fishbone diagram is also known as the Ishikawa diagram.
The other given options are incorrect because they are not any technique for finding the roots of the problem.Thus, the correct option is option(2).
Look for it in the dictanory
Answer:
Follows are the code to the given question:
def steps_to_miles(user_steps):#defining a method steps_to_miles that takes a variable user_steps
return user_steps/2000#use return to calculate the steps
user_steps = int(input())#defining a variable user_steps that holds value from the user-end
print('%0.2f' % steps_to_miles(user_steps))#defining print that calls the steps_to_miles method
Output:
5345
2.67
Explanation:
In this code a method "steps_to_miles" that takes "user_steps" in the parameter inside the method a return keyword is used that calculates the user steps and return its values.
Outside the method, a "user_steps" variable is declared that inputs the value from the user-end pass into the method and prints its value.
Answer:
2. <em>A reference of type A can be treated as a reference of type B</em> - False
Base class or its objects are not related to their derived class (or its objects).
Explanation:
class A {
int a;
public A() {
a = 7;
}
}
class B extends A {
int b;
public B() {
b = 8;
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
1. <em>After the constructor for class B executes, the variable a will have the value 7 </em>- True.
When an object of a derived class is declared, the constructor of base class is called before the constructor of derived class (is called).
3. <em>Both variables a and b are instance variables </em>- True.
Classes can have instance, or member, variables and methods.
4.<em> After the constructor for class B executes, the variable b will have the value 8</em> - True.
When object of class B is declared, its constructor was called, which initialized variable b to 8.