Answer:
The expression on line 9 required 2 brackets
Explanation:
Given
The attached code
Required
Why syntax error.
The error points to line 10, but the error is actually from line 9
To get an integer input, the syntax is:
variable-name = int(input("Prompt"))
From the attached code, the line 9 is:
amount = int(input("Enter cheese order weight: ")
By comparing the syntax to the actual code on line 9, only 1 of the brackets is closed.
<em>This, in Python 3 is a sytax error</em>
Answer:
- #include <iostream>
- using namespace std;
- class myinteger {
-
- private:
- int value;
-
- public:
- myinteger(int x){
- value = x;
- }
-
- int getValue(){
- return value;
- }
-
- };
- int main()
- {
- myinteger obj(4);
- cout<< obj.getValue();
- return 0;
- }
Explanation:
Firstly, we use class keyword to create a class named myinteger (Line 5). Define a private scope data field named value in integer type (Line 7 - 8).
Next, we proceed to define a constructor (Line 11 - 13) and a getter method for value (Line 15 -17) in public scope. The constructor will accept one input x and set it to data field, x. The getter method will return the data field x whenever it is called.
We test our class by creating an object from the class (Line 23) by passing a number of 4 as argument. And when we use the object to call the getValue method, 4 will be printed as output.
Answer:
anycast
Explanation:
Anycast -
It refers to as the routing methodology and the networking address where only one destination address has more than two pathway for the end destination , is referred to as an anycast .
In this case , the router has the capability to select the pathway to reach the destination , depending on the latency measurement , cost , distance and hops .
Hence , from the given information of the question ,
The correct answer is anycast .
Answer:
Diagrams, Flow Charts, Lists, Processes
Explanation: