Need help with your Discussion

Get a timely done, PLAGIARISM-FREE paper
from our highly-qualified writers!

glass
pen
clip
papers
heaphones

University of North Texas C++ Coding Python Code Project

University of North Texas C++ Coding Python Code Project

University of North Texas C++ Coding Python Code Project

Description

General information/requirements/grading rules

  1. Adhere to the naming conventions discussed in class for variable names, program name and function names
  2. Use meaningful names for variables
  3. If there are two words in the variable use first word lowercase and first letter of second wordupper case i.e., firstName or underscore between 2 words i.e first_name
  4. Include appropriate comments in the code
  5. Output should be displayed exactly as mentioned against each problem
  6. Indent the lines of code appropriately

7. All programs must be written with the main module.

1. Write and read file

a ) write_num.py

Create a num_list file to write a range of numbers from 1 through 101.

Hints:

Define main ():

Open a file named as num_list in write mode.

Use for loop to write a range of numbers from 1 through 101 into the file.

Close file

End main()

b)read_num.py (10 points)

Use num_list file which got created in number 1.a. Write a program that will prompt the user to enter the name of the file (i.e. num_list.text), and display the first 10 lines of the file’s content.

Hints:

Define main ():

Declare variables: line and counter, and initialize them

Prompt for file name: use input function

Open the file in read mode.

Read the lines in the file with readline function: ‘inline.readline()’ and initialize counter to 1

Use a while loop to read and display the first 10 lines

Use rstrip method to remove n characters at the end of the line

Print the line

Update the counter when the line is read

Close file

End main()

Expected output:

Enter the name of the file: filename.txt

#

#

#

#

#

#

#

#

2. numanalysis.py

Write a program that asks user to enter a series of 10 numbers. The program should store the numbers in a list then display the following data.

1. The lowest number in the list

2. The highest number in the list

3. The total of the number in the list

4. The average of the number in the list

Hints:

Define main ():

Declare variables and initialize them

Create an empty list

Use the for loop with the range function to loop through 10 numbers.

Prompt the User to enter the numbers from 1- 10.

Ex: Enter number 1 of 10:

Use append function to populate the list

Use min, max, sum, functions to find the low , high and total number of the list.

Ex: low = min(number_list)

Print Low, high , total and average numbers of the list.

End main()

Expected output :

Low: #.##
High: #.##
Total: #.##
Average: #.##

3. char_analysis.py

Write a program that reads the file’s contents and determine the following:

  1. The number of Uppercase letters in the file
  2. The number of Lowercase letters in the file
  3. The number of digits in the file
  4. The number of whitespace characters in the file

HINTS:

Define main():

Declare Local variables

Open file text.txt for reading. Use ‘text.txt’ file attached under module.

User for loop to step through each character in the file.

Determine if the character is uppercase, lowercase, a digit, or space, and keep a running total of each.

Close the file.

Display the totals of uppercase, lowercase, digits, spaces.

Sample Output:

Uppercase letters: 29
Lowercase letters: 1228
Digits: 30

Spaces: 260

4. unique.py Write a program that opens a specified text file (text2) then display a list of all unique words found in the file .

HINTS:

Define main():

Declare Local variables

Open file text2.txt for reading. Use ‘text2.txt’ file attached under module.

User the set method to find the unique words in the file and store each of them as an element of the set.

Close the file.

Sample output:

These are the unique words in the text:
its
mail-carrying
in
So
name
English
Russia,
twelve
metric
Java,
is
were
1,162
speed
shipowner

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Order Solution Now

Our Service Charter


1. Professional & Expert Writers: Eminence Papers only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Eminence Papers are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Eminence Papers are known for the timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Eminence Papers, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.

We Can Write It for You! Enjoy 20% OFF on This Order. Use Code SAVE20

Stuck with your Assignment?

Enjoy 20% OFF Today
Use code SAVE20