Answer:
d. This statement results in input failure.
Explanation:
We are taking input of 3 variables only and those are x,ch,and y. cin is a C++ keyword used take input entered by the user onto the screen cin is not a variable.
The input should of type int char int as written in the code. First is x and character variable ch and then the integer variable y and there should be only three inputs.
Answer: Let you organize and summarize your data.
Explanation: Data grouping is referred as the making a collection or cluster of data in a report .The group is made for the summarization of the information and makes easily understandable according to the subject or field due to the proper organization.
Other given options are incorrect because it does not provide the total of the report content,attractive form of the data or editing function in report.Thus the correct option is summarizing and organizing the data.
Answer:
Super
Explanation:
In object-oriented programming (OOP) language, an object class represents the superclass of every other classes when using a programming language such as Java. The superclass is more or less like a general class in an inheritance hierarchy. Thus, a subclass can inherit the variables or methods of the superclass.
Basically, all instance variables that have been used or declared in any superclass would be present in its subclass object.
Hence, when the keyword super is followed by a parenthesis, it indicates a call to the superclass constructor and it should be the first statement declared in the subclass constructor.
Answer:
The code to calculate the area of a circle is:
from math import pi
def circleArea(radius):
if radius > 0:
return pi * (radius ** 2)
else:
return None
if __name__ == '__main__':
radius = 5
print("Radius: {} Area: {}".format(radius,circleArea(radius)))
Explanation:
A detailed explanation of each line of code is given below.
#Define the number pi used to calculate the area
from math import pi
#We define a function that calculates the area of a circle
def circleArea(radius):
#Check if the radius is valid ( radius > 0) since there aren´t negative radius
if radius > 0:
#Compute the area formula for a circle 
return pi * (radius ** 2)
else:
#Return None if the radius is invalid
return None
#Run the function we´ve defined
if __name__ == '__main__':
#Define a radius
radius = 5
#Call the function and parse the radius through it, then print the result
print("Radius: {} Area: {}".format(radius,circleArea(radius)))