the barcodes and their status as seen output below. 5+1+2+5+4-17 7+3+8+9+3+2-32 3x2=6 23601 05 6+1-13 +-10 Even : 2+6+1+5+0= Odd: 1+3+0+0+7+ 3 x 8 = 24 4+4=8 10-8= 2 (CORRECT) ubmit: ynb file which contains checkBarcode function which takes a string variable as inpu da driver program which reads in "barcodes.txt" and creates "output.txt". Assume rcode into per line. Your input file name MUST BE "barcodes.txt" and the output file name MUST BE up to -30 pts penalty imple output.txt:
the barcodes and their status as seen output below. 5+1+2+5+4-17 7+3+8+9+3+2-32 3x2=6 23601 05 6+1-13 +-10 Even : 2+6+1+5+0= Odd: 1+3+0+0+7+ 3 x 8 = 24 4+4=8 10-8= 2 (CORRECT) ubmit: ynb file which contains checkBarcode function which takes a string variable as inpu da driver program which reads in "barcodes.txt" and creates "output.txt". Assume rcode into per line. Your input file name MUST BE "barcodes.txt" and the output file name MUST BE up to -30 pts penalty imple output.txt:
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
![12 Digit Barcode
In this homework, you will develop a python program
which reads a series of barcodes from "barcodes.txt"
and creates an output file "output.txt" which contains
the barcodes and their status as seen in the example
output below.
153182953420
5+1+2.5.4-1
7+3+8+4+3+2-3
1
23601057072
6+t-13
Even : 2+6+1 +5+0 = 14
Odd: 1+3+0+ 0 +7+7 = 18
3 x8 = 24
D+3- 10
4 + 4 = 8
10 -8 = 2 (CORRECT)
What to submit:
1) ipynb file which contains checkBarcode function which takes a string varlable as input and returns true or false,
and a driver program which reads in "barcodes.txt" and creates "output.txt". Assume the input file contains one
barcode info per line.
Important: Your input file name MUST BE "barcodes.txt" and the output file name MUST BE "output.txt". Otherwise,
you'l get up to 30 pts penalty
Below a sample output.txt:
123601057072 is a valid 10-digits barcode
lab601057072 is an invalid 10-digits barcode
172601055072 is an invalid 10-digits barcode
12345 is an invalid 10-digits barcode
753182953427 is a valid 10-digits barcode
etc.>
Penalties :
late submission, cheating and non-working code: up to -100pts
improper commenting : up to -20pts
not using a function : up to -50pts
no driver program : up to-50pts
improper coding style: up to -10pts (like, variable names and indents)
improper input/output file names : up to 30pts
program does not work for some-all of the sample input file : up to -100pts](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F31a023c1-a67f-4680-9780-32cb66bf8f64%2F1966b6fb-5f47-46c0-8059-a521937278cd%2F8j12stk_processed.jpeg&w=3840&q=75)
Transcribed Image Text:12 Digit Barcode
In this homework, you will develop a python program
which reads a series of barcodes from "barcodes.txt"
and creates an output file "output.txt" which contains
the barcodes and their status as seen in the example
output below.
153182953420
5+1+2.5.4-1
7+3+8+4+3+2-3
1
23601057072
6+t-13
Even : 2+6+1 +5+0 = 14
Odd: 1+3+0+ 0 +7+7 = 18
3 x8 = 24
D+3- 10
4 + 4 = 8
10 -8 = 2 (CORRECT)
What to submit:
1) ipynb file which contains checkBarcode function which takes a string varlable as input and returns true or false,
and a driver program which reads in "barcodes.txt" and creates "output.txt". Assume the input file contains one
barcode info per line.
Important: Your input file name MUST BE "barcodes.txt" and the output file name MUST BE "output.txt". Otherwise,
you'l get up to 30 pts penalty
Below a sample output.txt:
123601057072 is a valid 10-digits barcode
lab601057072 is an invalid 10-digits barcode
172601055072 is an invalid 10-digits barcode
12345 is an invalid 10-digits barcode
753182953427 is a valid 10-digits barcode
etc.>
Penalties :
late submission, cheating and non-working code: up to -100pts
improper commenting : up to -20pts
not using a function : up to -50pts
no driver program : up to-50pts
improper coding style: up to -10pts (like, variable names and indents)
improper input/output file names : up to 30pts
program does not work for some-all of the sample input file : up to -100pts
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 4 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY