Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

What\'s the problem with gander and level? It\'s not work in WriteLine btn Creat

ID: 3810780 • Letter: W

Question

What's the problem with gander and level? It's not work in WriteLine
btn Create click send level my New Profile Name txt Name, Text my writer i IO.Str Nriter IO.File.createText (myNewProfileName) chc Female Checked gander chc Female. Text Elself chcMale. Checked True Then gander chcMale. Text Elself rbtnEasy. Checked True The level "Easy Elself rbtnNormal hecked True The level "Normal" lsel rbtnHard Checked True The level Hard" End If mywriter. WriteLine( name & txtName. Text) my writer. WriteLine("Age & comAge. Text) mywriter. WriteLine ("Gander & gander) my writer. WriteLine("Level: & level) mywriter. .Close End Sub End Class

Explanation / Answer

You need to have the if else condition like this:

if

else

if

else if

else

You just need to replace the conditions that you have given and replace it with the conditions that is above.

It first need to compute the gander and then it need to compute the level. But what you are doing is: first it will calculate only gander not the level, it will come out of the loop once it matches with any of the conditions that you have written.

So you just replace the conditions with the conditions which have written.

Just see the usecase of if and else if.

How it works if the "if" conditions satisfies then it will not enter in any of the other conditions.

If any of the "else if" conditions satisfies then it will not enter any of the below conditions.

And if none of the conditions satisfies then it will enter the else block.

So thats it.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote