Answer:
a = int(input("Enter first value between 1 - 10"))
b = int(input("Enter second value between 1 - 10"))
z = a + b
z += 30
print("The value of z = ", z)
Explanation:
The code is written above in python language to perform the given task.
Now, let us explain each statement of code.
Step 1: The first two lines take input from the user prompting the user to enter the values between 1 to 10.
Then the values are type casted to int using int().
The values are stored in variables a and b.
Step 2: Then, the values of a and b are added to get another variable z.
Step 3: The statement 'z += 30' is equivalent to z = z+30
It adds 30 to the variable z and stores it in the same variable z.
Step 4: Finally the value of variable 'z' is printed using print() command.
Answer: Exception
Explanation: A throw statement is a statement that whenever it gets executed ,it stops the flow of the execution immediately. The throw statement has a throw keyword for stopping of the execution which is denoted as the exception. A checked or unchecked exception can only be thrown. The compiler of a program has the function of giving warning if there are chances of exception.
Answer:
1. Get the number
2. Declare a variable to store the sum and set it to 0
3. Repeat the next two steps till the number is not 0
4. Get the rightmost digit of the number with help of remainder ‘%’ operator by dividing it with 10 and add it to sum.
5. Divide the number by 10 with help of ‘/’ operator
6. Print or return the sum
# include<iostream>
using namespace std;
/* Function to get sum of digits */
class gfg
{
public:
int getSum(float n)
{
float sum = 0 ;
while (n != 0)
{
sum = sum + n % 10;
n = n/10;
}
return sum;
}
};
//driver code
int main()
{
gfg g;
float n = 687;
cout<< g.getSum(n);
return 0;
}
Explanation:
Answer:
A structured chart is a sequential representation of program design
Explanation:
It is true that a real-time system which is a term to describe an operating system working in relation to real-time is actually a form of the online system. Hence, option B is not correct.
It is also true that Batch totals are not incorporated while designing real-time applications because Batch Data processing is carried out in a separate manner and at a time when the computer is free. Thus Option C is not Correct
It is also true that 4GL which stands for Forth generation programming language is used for application prototyping. Again Option D is not Correct.
However, a structured chart is not a sequential representation of program design, but rather a break down to the infinitesimal module in the program design. Hence, option A is the correct answer.
B. They're able to produce a higher voltage.
C. They're vented to release gassing.
D. They recombine sulfuric acid.
I’d go for (A) as the right choice.
The basic principles of Oxygen-recombination chemistry hasbeen combined to traditional lead batteries technology to produceValve-regulated lead-acid battery (VRLA), also called recombinant batteries. The applicationof oxygen cycle to VRLA, at first, is much more difficult. However, if correctprinciples are followed, it becomes easy.