Answer:
its not letting me Write out the code so here are screenshots
Explanation:
Answer:
See Explanation
Explanation:
<em>See attachment for complete question</em>
The programming language is not stated; I'll answer using Python and Java
Python:
low = 56
high = 70
for i in range(low,high+1):
print(i)
Java:
public class PrintOut{
public static void main(String [] args)
{
int low = 56; int high = 70;
for(int i = low; i<=high;i++)
System.out.print(i+" ");
}
}
For both codes, the explanation is:
The code starts by initializing the range of the print out to 56 and 70
Next, the code segment used an iteration that loops through 56 and 70 and print each digit in this range (both numbers, inclusive).
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:
- num = 11
-
- while(num <=88):
- firstDigit = num // 10
- secondDigit = num % 10
-
- if(firstDigit == secondDigit):
- print(num)
-
- num += 1
Explanation:
Firstly, create a variable, num, to hold the starting value, 11 (Line 1)
Create a while loop and set the loop condition to continue the loop while num smaller or equal to 88 (Line 3).
Within the loop, we can use // to perform the floor division and get the first digit of the num. We use modulo operator % to get the second digit of the num. (Line 4 - 5)
If the firstDigit is equal to secondDigit, print the number (Line 7 -8). Lastly, increment the num by one and proceed to next iteration (Line 10).
Answer:
Electric charge is related to electricity.
Explanation:
Electric energy or electricity is a physical phenomenon that occurs as a result of electrical charges and the interaction between them. In this way, electrons and protons are the main subatomic particles responsible for their appearance.
Electricity can originate or transmit by causing the movement of electrical charges from one point to another. It is a very common situation within nature itself, where electrical energy manifests itself in various ways, transforming into other types of energy. Examples of this phenomenon are electrical storms or the nervous system of living beings.