Write a program to process an input j?le where data in j?le

Assignment Help Python Programming
Reference no: EM132355701

1. Write a program to process an input J?le where data inthe J?le is individual lines of credit card numbers {fake numbers, of course]. Your program must indicate if each credit card number is a valid number based on the J?sllowing criteria:

a. First digit must be either a 3, 4, 5, or 15

b. You mayimust assume that all credit card numbers are 10 digits long (again, these are fake numbers],

and using this assumption, start with the leftmost digit, double every second digit from left to right and

add those values together

For example, iftbe credit card number is: "16612346!

You would add the following: 3+12+2+?+12, which is a total of 4!]

c. Again using the assumption that there are It] digits, starting with the second digit, simply add every

second digit from left to right

For example, iftbe credit card number is: "16612346!

You would add the following: ?+15r+2+4+4, which is a total of lti

d. Sumthe results from step h &c

e. Ifthe result from step e is evenly divisible by ID, then the credit card number is valid. You do NOT lmow how many lines of data are in the file, therefore you must use a sentinel-control loop to process the data. The end oftbe datawill he indicatedby a credit cardnumberof all zeroes. Print a "neat and tidy" table {see sample rim] as you read through the file indicating whether each credit card is valid or invalid based on these criteria.

2. Function Requirements You must have three flmctions for tasks a, h & c listed above. They must each be value-returning functions. There must also he a main? flmction containing your sentinel-control loop. Other functions are allowed.

Reference no: EM132355701

Questions Cloud

What is the projects mirr : If the Present Value of all estimated futures costs of a 4 year new investment project is 960, and the future value of all expected profits
What is vogt required rate of return : Vogt Corporation has a Beta of 1.4. The U.S. government T-Bill is expected to yield 0.05, and the S&P 500 is expected to yield 0.13 in the near future.
What is the initial cash outflow of project : The tax rate is 35% and the required rate of return is 14%. What is the initial cash outflow of this project?
Describe the yield curve and how it is constructed : Describe the yield curve and how it is constructed. What theories best explain the changes in the yield curve?
Write a program to process an input j?le where data in j?le : Write a program to process an input J?le where data in the J?le is individual lines of credit card numbers.Your program must indicate.
Advantages and disadvantages of a purchase : What are the advantages and disadvantages of a purchase of assets from the perspectives of the buyer and the seller?
Time at present residence : A finance company that lends to "high-risk" automobile buyers, finds the following variables important in classifying default probabilities
Smo has a four-for-seven reverse stock split : SMO has a four-for-seven reverse stock split? Determine the new number of shares outstanding in parts (a) through (d). Please show work.
Determine the air to fuel ratio on a mass basis : Poplar has a dry, ash-free composition of 51.98%C, 6.30%H, 41.72%O, and negligible N. Determine the air to fuel ratio on a mass basis

Reviews

Write a Review

Python Programming Questions & Answers

  Simulates a simple money manager

ITECH1400 – Foundations of Programming - ability to provide a login screen to prevent other people from viewing the information contained in the tool

  Whatever is done in excel you have to do it in python

Whatever is done in excel you have to do it in python. Like you have to categorize the tweets related to app and other. It should be done by using pandas

  Write a python class definition for class sumi

Write a python class definition for class ‘Sumi' with a single instance variable self.num of type ‘int' and single instance method called "sum_of_digits".

  Plot the bar chart of a dataset

MA1008 Introduction to Computation Thinking - Compose the chart from basic graphic elements like points, lines and texts using functions in Turtle

  Project title email spam filterabstractanalyze the emails

project title email spam filterabstractanalyze the emails and predict whether the mail is a spam or not a spam.to work

  Find in the dataset how often u2 is mentioned as artist

Write and run Hadoop code (mappers and reducers) to find in the Last.fm dataset (a) how often U2 is mentioned as artist and (b) songs that have been played more than 600 million times.

  What python ides are being used in the industry

Research the differences between JES, IDLE, and PyCharm. Compare/contrast features (a chart might be helpful). What Python IDEs are being used in the industry?

  Write a program in python to draw a simplified face

Write a program in Python to draw a blue triangle in a drawing window. Write a program in Python that moves the triangle in an animated movement. Write a program in Python to draw a simplified face.

  What is the average size of each color diamond

Using pandas and the diamonds data set from class - What is the average size of each color diamond. Plot the density of the prices

  Write a class called darts

One way to estimate the value of p is to simulate a darts game. The darts player throws at a circular board with a radius of 1 foot.

  How is your hub set up and what type of hubs do you use

How is your Hub set up and what type of Hubs do you use and What type of servers are you currently using and

  Write a python program that allows the user to enter

Write a Python program that allows the user to enter a series of numbers and places the numbers (not string values) in a list.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd