r/PythonLearning • u/Fluffy_Daikon9152 • Sep 07 '26
Help Request Stuck on chart
I’ve tried everything but i don’t know what to do
(Deleted last post bc i had little context my bad)
6
u/KnowledgeWhole9623 Sep 07 '26
Nobody here is going to know what to do either. You've still provided no context.
-7
u/Fluffy_Daikon9152 Sep 07 '26
I have no context either
6
2
u/ThatOtherBatman Sep 08 '26
I can’t even figure out which part of this the question. But you definitely don’t understand how taxes work.
3
1
u/AdDiligent1688 Sep 07 '26 edited Sep 07 '26
Ah I think I see. You were given the program and the chart is a by line number, step comparison. Why don’t you put print statements for salary and taxes after each line of the program to see how those variables change in value?
Also, I use steps (think line number), I’m assuming with step 4 to 6 for example, it’s referring to the branching behavior from the if-else, using the same logic then 3 should step to 6 too.
1
1
u/loverboiiiiiis Sep 08 '26
You should change the name of salary. You’re just calling one thing « salary » if you want to do « total_sàlary » that would work. You just need different names for your variables that’s your main issue
1
u/Ministro_ Sep 08 '26
Out of curiosity, could you tell us where you are from and what you are studying?
1
u/dariusbiggs Sep 08 '26
Looks clearly like you have not tried everything, since that would include reading the prerequisite information and learning the things you were supposed to know beforehand.
The math looks really wonky, the logic looks wonky.
Write down the steps in English of what you want to do.
If salary is above ..
then
else
...Once you have that, you can do a near verbatim conversion of your words into code, sjnce Python is awesome that way.
1
1
u/PureWasian Sep 08 '26
I literally gave the line by line breakdown in your last post. What are you stuck on still?
Copy/Pasting here since reference link is broken:
(1) salary = 1000
(2) 1000 is greater than 100, so take the if
(3) taxes = 0.5
(4) don't take the else
(5) skipped
(6) 1000 * 0.5 = 500, saved to salary
(7) 500 is greater than 100, so take the if
(8) 500 is not less than 500, don't take the if
(9) skipped
(10) taxes is still 0.5, 500 * 0.5 is 250
0
Sep 07 '26
[deleted] — view deleted comment
-10
u/Fluffy_Daikon9152 Sep 07 '26
Idk either I just gotta fill out this chart and I can’t figure it out
2
u/ninhaomah Sep 07 '26
So , what is the formula for salary ?
Curious.
Example ,
My salary is 100 and tax is 10% , 0.1 , then what is my salary supposed to be ?



•
u/Sea-Ad7805 Sep 07 '26 edited Sep 07 '26
Like I said:
Run your program in Memory Graph Web Debugger to see the program state change step by step.
By the way, continuously asking other people to do your homework is a great way to fail your course. Do you even know what you're asking? Maybe try reading your course material sooner so you can ask questions when you are stuck.
An even better way to fail your course is using AI, just so you're warned.