Python Forum
Substracting number with a limit
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Substracting number with a limit
#1
Hello,
I'm new to this forum since I'm starting to use Python at school.

In one of my homework, I need to be able to substract a meter when it will reach the limit of 999999999 from the new number ie: 000000027 so I will print the number 28

It might be easy so this is why I'm turning to this forum.

Thank you.
Reply
#2
Are you asking how you would go about a counter that goes 0-999999999 <-- (that being the limit), then once it does it will subtract from a different number?
Reply
#3
As for now since I'm substracting from the last number entered ie: 000000027 - 999999999, I will get a negative number. I need to find the twist to see 28 printed on screen.

Thanks.
Reply
#4
I suggest you get out a pen and paper, and work out the basic principle of the arithmetic using a much smaller range. Say a meter that goes from 20 to 40.
I am trying to help you, really, even if it doesn't always seem that way
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  pandas dataframe substracting columns: key error metalray 2 7,051 Feb-24-2017, 07:59 AM
Last Post: metalray

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020