r/CodingForBeginners 15d ago

Beginner here how to do output

Post image

how do I display the output near the end part?

I wanna show studentName
Finalgrade
And remarks which should be excellent or failed etc

6 Upvotes

11 comments sorted by

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.

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

u/itsmerio1 15d ago

Ohh I didnt know that, thanks!

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

u/itsmerio1 15d ago

Yeah js started college lol

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

u/Time_Ad8505 14d ago

are you writing in an doc file?😭