Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

I have a question about python (for-loop)

I need to solve a assignment. can you guys please help me to solve it.

How can you increase by a 10 with each iteration, with the For loop?

Assignment:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

make sure that the heart rate starts at 60 and continues through 140 and the heart rate increases by a 10 with each iteration. With each heartbeat.

this is my beginning line. But how can I put the 10 iteration in this line?

for hartslag in range (60,141)

>Solution :

We’re not supposed to help with homework assignments, but whatever.

Here you go,

for hartslag in range(60,141,10):
  print(hartslag)
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading