Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Write a program to read a text file, employeenames

Write a program to read a text file, employeenames

Writing

Write a program to read a text file, employeenames.txt, and creates anther file called “usernames.txt” with usernames with format first character of first word and the complete second word. Your program must work with any given two files. Ex: the first name in the employeeNames.txt file is Sai Lakkaraju. His username must be “slakkaraju” 2. The body mass index (BMI) is calculated as a person’s weight (KG) divided by the square of the person’s height (in inches). A BMI in the range 19-25 (inclusive) is considered healthy. Write a program that calculates a person’s BMI and prints a message telling whether they are above, within, or below the healthy range.This program must keep on calculating BMI for the given input till user says, “they don’t want to continue”. Hint: use a while loop and ask the user if they want to calculate BMI. If the answer is “Yes”, continue with calculations. If the answer is “No” quit the program. Example: Input: Height = 1.78 m Weight = 102 KG Process: BMI = 102 / (1.78*1.78) = 32.2 Output: Your BMI is 32.19. You are obese. Lose weight to live longer. See https://bmicalculatoraustralia.com/ for an example BMI calculator. 3. Write a program to compute the “N” th Fibonacci number where “N” is a value entered by the user. The Fibonacci sequence starts with 1,1,2,3,5,8, 13.... Each number in the sequence is the sum of the previous two (except the first two 1,1). Ex: input n = 10 out put 10th Fibonacci number is 55. The Fibonacci sequence is 1,1,2,3,5,8,13,21,34,55. Bachelor of Interactive Media BIM114- Programming Fundamentals Wentworth Institute of Higher Education, 302 Elizabeth Street, Sydney http://www.win.edu.au/ Higher Education CRICOS code: 03279M 4. Write a program that will read a text file as input and will display the word frequency in the text file. Ex: if the input text file contains the following text; “Hello, my name is Sai Kiran Lakkaraju. I am a staff at Win college. I started working at Win college this term; term 2, 2020.” Output should look like

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE