Using python and sys.argv Create a program inrange.py that has a function that takes one integer argument.  The function will print a list of all values between 5000 and 8000 that is divisible by (1) the integer argument, and (2) the argument + 4.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 5PE
icon
Related questions
Question

Using python and sys.argv

Create a program inrange.py that has a function that takes one integer argument.  The function will print a list of all values between 5000 and 8000 that is divisible by (1) the integer argument, and (2) the argument + 4.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

For the results - how would you get the output wrapped in [ ].

 

For the command line you would input python3 inrange.py 5

and your output would follow: 

  1. [5040, 5085, 5130, 5175, 5220, 5265, 5310, 5355, 5400, 5445, 5490, 5535, 5580, 5625, 5670, 5715, 5760, 5805, 5850, 5895, 5940, 5985, 6030, 6075, 6120, 6165, 6210, 6255, 6300, 6345, 6390, 6435, 6480, 6525, 6570, 6615, 6660, 6705, 6750, 6795, 6840, 6885, 6930, 6975, 7020, 7065, 7110, 7155, 7200, 7245, 7290, 7335, 7380, 7425, 7470, 7515, 7560, 7605, 7650, 7695, 7740, 7785, 7830, 7875, 7920, 7965]
Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Arrays
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT