#๐ Is this a good thing?
21 messages ยท Page 1 of 1 (latest)
@copper furnace
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
replit I take it?
would be better to use your own pc if available
you get more out of it than some hosted version
- you don't call the function you defined
- you take an argument called
incidentSeveritybut immediately throw away and replace its value incidentSeverityis set to the literal string"enter severity level: ". did you mean to useinput()there?- you're comparing
incidentSeverityto variables called minor, moderate, and severe. you didn't define these anywhere. most likely you wanted to make them strings, in which case you need to surround them with quotes.
So text editor?
I mean command prompt?
Will do
yeah that works. something like vscode would do
tbf, i did use str because i think our professor wants us to do so in the intructions
@copper furnace that just says that they expect incidentSeverity to be a string. The input() function returns a string.
Oh, you don't need that line at all: you get given incidentSeverity when the function is called. Just use it.
i.e. remove incidentSeverity = str("enter security level: ') entirely, or move it out of the function.
Ok
Then just leave the rest of the code as is?
Or is there anything else I should change?
Other have pointed out that you're comparing to variables instead of strings, etc.
This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.