Stderr is 2. stdin is 0, stdout is 1.
Answer:
The debugged program is as follows:
A=2
B=2
For I=1 to 10
PRINT A
TEMP = A
A=B
B=TEMP+A
NEXT I
END
Explanation:
First, the value of B should be changed to 4 (because the second term of the sequence is 2
Next, change Display to Print because Q-basic uses the print keyword to display output
The sequence is not properly generated. So, I update that part of the program to:
<em>For I=1 to 10
</em>
<em>PRINT A
</em>
<em>TEMP = A
</em>
<em>A=B
</em>
<em>B=TEMP+A
</em>
<em>NEXT I
</em>
<em />
Lastly, the loop is controlled by variable I (not X).
So change NEXT X to NEXT I
If( caryear >= 2000 ):
print "probably has air bags.\n"
elif( caryear >= 1990 ):
print "probably has anti-lock brakes.\n"
elif( caryear >= 1970 ):
print "probably has seat belts.\n"
else:
print "probably has few safety features.\n"
Explanation:
1. Seeing people do technological innovations, so you have some motivation and inspiration to be fluent in computer
2. Try experimenting and trying stuff, like trying to learn how to code, how the internet work, etc.
3. work more with computers, for example, make a note with OneNote, making digital art with blender, adobe illustrator etc.
4. Try to learn how to be better at learning computer, like, if you do mistakes in your learning journey, try to avoid it next time
5. good luck ;)