i have 2 part lab complete the following programming exercises
Lab 1 PART A
complete the following programming exercises.
file into a list. The program should then process the numbers in the list and display the following information:
Notes There are several issues that will be need to be addressed to make lab 3 work:
A line break (n)exists at the end of each record (row) . When reading the file, use the method replace() to replace line breaks with null (“”)
Records on the file are stored as strings. When reading the file, use the method int() to convert the strings back to ints.
LAB 1 PART B
Write a program that writes a series of random†integers, one per line, to a file. Each random number should be in the range of 1 to 500. The application should first prompt the user to specify how many random numbers the file should hold. Include a custom try/exception block to verify that the user entered a number > 0. Include a try/exception block to verify that the user entered an integer. Note: records must be stored as strings – see method str()
(Extra Credit) Write a program that takes as input the file statesPopulation.txt. Add to a list and report. :
format: state, population, abbreviation
Sort by state name
Report on state name and population (consider method split())
Format population with commas (convert to int)
Save your programs in plain text files and submit these by the due date/time.
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount! Use Discount Code “Newclient” for a 15% Discount!
NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.
The post i have 2 part lab complete the following programming exercises appeared first on Custom Nursing Help.
"Are you looking for this answer? We can Help click Order Now"