Answer:
Know the sport really well so you can anticipate the moment when something exciting might happen. - c
Answer:
Program is in C++
Explanation:
C++ Code
1) By using For Loop
void forLoopFunction(int value){
for(int start=value; start>0; start--){
cout<<start<<endl;
}
}
Explanation
Start for loop by assigning the loop variable to parameter value and condition will be that loop variable will be greater then 0 and at the end decrements the loop variable.
2) By usin WhileLoop
void whileLoopFunction(int value){
while(value>0){
cout<<value<<endl;
value--;
}
}
Explanation
In while loop first add the condition as variable must be greater then 0 and then print the value with endl sign to send the cursor to next line and at the end of the loop decrements the variable.
The program is an illustration of the square function.
The square function takes a number, and returns the square of the number; i.e. the product of the number twice.
So, the square function in Python, where comments are used to explain each line is as follows:
#This defines the square function
def square(num):
#This returns the square of the argument
return num**2
#This gets input for the number
num = int(input("Number: "))
#This calculates the square of the number
x = square(num)
#This prints the square
print("Square:",x)
Read more about Python functions at:
brainly.com/question/25120954