31 Replies
How can a number be less than 0 and more than 35 at the same time?
i was trying to put less than 0 or greater than
i thought that was the right one
im used to just putting or
&&
is and
||
is oron py
either way though
thats after line 2
and line 2
Or if you're used to Python,
dpMark is < 0 or > 35
doesnt let me input anything
program jsut closes
You mean it closes before you enter anything, or after you type in something?
before
as soon as i run it
and i dont get it
i used the same parse line
on my previous assignment 5 minutes ago
and it worked
only thing diff is variable name
I wonder if it runs a previous version of the project
I have a suspicion that
prevents it from compiling
yh
thats it
i removed dpMark
and it works
like it should
Console.WriteLine()
with two params works like string.Format()
up until thjen
So it expects the first param to be a template string
i wasnt sure how to print that
And the rest to be params
Use string interpolation
$"{dpMark} is whatever"
thank you so much bro
š
is there way to say and or
Wym "and or"
ive got two conditions and if one or both of them are true
i want it to do something
That's an or
oh yh ig
Angius
REPL Result: Success
Console Output
Compile: 567.787ms | Execution: 83.022ms | React with ā to remove this embed.
why is it not letting me set moduleMark to 34 at the bottom
everything else is fine i think but
You already have
moduleMark
variable declared
You cannot redeclare itcan i not edit it
You can
moduleMark = 34.0
do i just remove double
oh
Yes
its working but i got the maths wrong somewhere
š
my invalid mark lines work
but if im putting all valid inputs in
im getting an output score of 0 everytime
š
Good time to learn how to $debug
Tutorial: Debug C# code and inspect data - Visual Studio (Windows)
Learn features of the Visual Studio debugger and how to start the debugger, step through code, and inspect data in a C# application.