❔ ✅ beginner class and properties
i am doing basic program abt class and getting information from input but on the weight section when i run the code it doesnt show anything even when debugging couldnt figure it out
28 Replies
this is where i have a problem
when running it just stops the whole code from running
You said you were debugging the code. Until which line did it work?
when i added 3 conditions
from here
Notice anything? 😄
omf brackets
thats the whole problem? wait
nope
still
hm
But you should be able to debug now speaking
yes but still wont only the dimension part will work? so same exact thing
i still get the same thing
code stops to run
is the statement in incorrect form?
So it crashes or does it jump elsewhere?
no just stops and the close messege
it doesnt jump to the printing part nor crashing
if statements can still work without brackets. They're used for readability
oh ty never knew that
or just forgot
And defining which code block to execute if true etc
without curly brackets however, there's a big difference between
and
is it bc where return is on the other statements
will that change anything even though there are brackets
nope same thing
good to know tho
what else can be the problem i just cant think of it
and been stuck for a while kinda new so :((
I believe only the first line of code after the condition is executed if no brackets are used
even though neither of them printed only return worked
Soo, what are your inputs for the animal properties then?
after it gets to inputing that part its just stops no crashes
wait what
how
That doesn't make sense. If you fixed the curly bracket stuff, it should work then
Sounds stupid, but maybe give your visual studio a restart? I don't see any mistakes anymore
i always make mistakes on brackets and stuck for an hour kinda miss python
one sec
IT WORKS
ty for the help
and for your time
i forget brackets always mb bc coming from python
ty and have a nice day
!close
Closed!
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.