Answer:
B. installApplication(‘A’, 1);
Explanation:
Given
The above code segment
Required
The correct call to installApplication
The function installApplication is declared as void, meaning that it is not expected to return anything.
Also, it receives a character and an integer argument.
So, the call to this function must include a character and an integer argument, in that order.
Option D is incorrect because both arguments are integer
Option C is incorrect because it passes no argument to the function.
Option A is incorrect because it receives an integer value from the function (and the function is not meant not to have a return value).
Option B is correct
Just try to answer some questions as well, then you can keep a nice balance.
ps. Only answer the questions you know.
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>