Answer:
B. A "while" loop inside of a "for" loop
Explanation:
To enter 5 grade values, a for loop can be used to specify the number of grade values to be entered by the user, in other to ensure the validity of the grade values entered by the user, the while loop will be used inside the for loop such that the inputted values will only be accepted when the user enters a valid grade.
Code structure :
For a in range(0, 5) :
grade = input()
while grade (enter condition)
This is just the code structure and this will work for the problem stated.
Answer: A
Explanation:
It clearly shows your out
Answer:
int sumAll(int n)//function definition.
{
if(n==1)//if condition.
return 1;
else//else condition.
{
return n+sumAll(n-1);//return the value and call the function in recursive manner.
}
}
Explanation:
- The above-defined function is a recursive type function that is written in the c language, which holds the if and else condition.
- When the user passes the largest value from 1, then the else condition will be executed which adds the largest value and pass the value after the decrement of the value as an argument.
- When the value will become 1, then the function if-block will be executed which returns the value and ends the calling function recursively.
Answer:
def normalize(text):
text = text.lower()
text = text.split()
return text
Explanation:
The functiinfunction is provided with an input text when called upon, then it changes every character in the text into lower case and split each word with a space.
The answer is 1040EZ. That is the shortest and simplest tax form.