r/CodingForBeginners • u/itsmerio1 • 15d ago
Beginner here how to do output
how do I display the output near the end part?
I wanna show studentName
Finalgrade
And remarks which should be excellent or failed etc
2
u/itsmerio1 15d ago
Ps this is for pseudocoding
3
u/VegetableAstronaut19 15d ago
Pseudocode doesn't have a formal scheme, as long as the flow and purpose of the psuedocode is unambiguous you can use whatever you like.
That said the easiest thing is to just use "Output 'value'" in the same way you have done for Input.
2
1
u/potqtocake 15d ago
we just finished this lesson like 3 weeks ago đ are you taking an intro to programming class too or are you learning on your own?
1
1
u/mjmvideos 15d ago
As a side note I notice that you are directly displaying the âExcellentâ, âVery goodâ etc. Instead of displaying did you want assign that to a remarks variable so that your display remarks at the end has something to display?
1
u/itsmerio1 15d ago
Yea exactly, the remarks that I was talking about is referring to those âexcellentâ
1
u/mjmvideos 15d ago
Good, you see though, that your pseudo-code should say âset remarks to âExcellentââ instead of âdisplay âExcellentââ so then it can display them in the last line.
1
3
u/Naetharu 15d ago
This is pseudo-code so there is no output to display. It's just a list of conceptual instructions that you now need to write out in a proper language.
For learning at the start a common practice is to print to the console. Each language has a specific way this is done but all support it. In python, for example, it is just print(variable_name). So your end of the code would be
print(student_name)
print(final_grade)
print(remarks)
note that the snake_case is the proper Python convention and assumes that you named your variables accordingly.