Answer:
b, a keyboard. Sometimes a, if it contains a microphone.
Answer:
The algorithm is as follows
1. Start
2. Declare Integer N
3. Input N
4. While N > 0:
4.1 Print(N%10)
4.2 N = N/10
5. Stop
Explanation:
This line starts the algorithm
1. Start
This declares an integer variable
2. Declare Integer N
Here, the program gets user input N
3. Input N
The while iteration begins here and it is repeated as long as N is greater than 0
4. While N > 0:
This calculates and prints N modulus 10; Modulus of 10 gets the individual digit of the input number
4.1 Print(N%10)
This remove the printed digit
4.2 N = N/10
The algorithm ends here
5. Stop
<u>Bonus:</u>
The algorithm in Python is as follows:
<em>n = 102</em>
<em>while n>0:</em>
<em> print(int(n%10))</em>
<em> n= int(n/10)</em>
<em> </em>
Answer:
The solution code is written in Python 3:
- calories = int(input("Enter number of calories: "))
- fats = int(input("Enter number of fat in grams: "))
-
- if(calories > 0 and fats > 0):
- cf = fats * 9
- if(cf < calories):
- percent = cf / calories
- if(percent < 0.3):
- print("Food is low in fat")
- else:
- print("Error input. Calories from fat cannot more than total calories")
- else:
- print("Error input. Calories and fats must be more than 0")
Explanation:
Firstly, use input function to ask user to enter total number of calories and fat in grams (Line 1-2)
Next we do the first input validation to check if the calories and fats are more than 0 (Line 4). If so apply formula to calculate calories from fats. If not, print error input message (Line 5, 13)
Then we proceed to next input validation to check if calories from fact more than total calories. If so, proceed to calculate percentage of calories from fats and if it is lower than 30%, display the appropriate message (Line 6 - 9). If fail the second input validation, the program will display another error input message again (Line 11)
Answer:
The answer to this question is "15 line".
Explanation:
A function is a block of ordered, portable code used to perform a single, connected operation. The syntax of function declaration can be given as:
Syntax :
returntype functionName(parameter1, parameter2); //function prototype
or declaration
returntype functionName(parameter1, parameter2) //function definition or header of the function
{
//function body.
//function implementation
//return value;
}
In the given question the header of the showDub function is on line 15.
That's why the answer to this question is "15 line".
Answer:
A. artistic and experimental college students
Explanation:
Grunge look was so popular in 1990 and 2000, but the concept was known in 1972 in Seattle, The style was popularized by music artists Kurt Cobain, and Pearl Jam, this style is so simple shirt, torn pants with a disheveled hair, this style replace the punk style, the alternative rock and the artist was key element for this simple style.