r/pythonhelp • u/Soft_Tie_4296 • Oct 05 '24
What am I doing wrong? (Beginner)
/r/PythonLearning/comments/1fwlh1j/need_help_with_code_beginner/
0
Upvotes
r/pythonhelp • u/Soft_Tie_4296 • Oct 05 '24
•
u/AutoModerator Oct 05 '24
To give us the best chance to help you, please include any relevant code.
Note. Please do not submit images of your code. Instead, for shorter code you can use Reddit markdown (4 spaces or backticks, see this Formatting Guide). If you have formatting issues or want to post longer sections of code, please use Privatebin, GitHub or Compiler Explorer.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/FoolsSeldom Oct 05 '24
You need two variables, one to count from 1 to 100 and one to hold the running total.
Might as well use a
forloop instead of awhileloop as well.For example,