MindTap Programming, 1 term (6 months) Printed Access Card for Farrell's Programming Logic and Design, 9th (MindTap Course List)
9th Edition
ISBN: 9781337274623
Author: FARRELL, Joyce
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Question
error_outline
This textbook solution is under construction.
Students have asked these similar questions
Please written by computer source
Instructions
Deliverables:
For this assignment you will submit two python files to the drop box. Name the main file: lastname_firstname_assign2.py and name the module file: conversion.py.
Example: turner_randy_assign2.py
Create a program that converts feet to meters and vice versa.
Specifications
The formula for converting feet to meters is: feet = meters / 0.3048
The formula for converting meters to feet is: meters = feet * 0.3048
Store the code that performs the actual conversions in separate functions within a separate code module named "conversions.py". These two functions will take a single parameter and return the resulting conversion value. Close the file
Start a new .py file and use an "import" statement to import your custom module into this new file
Write a separate function to display the program banner/title
Write a separate function to display the menu as shown below in the sample output
Write the rest of the code to (1) take the user…
A file named Maintenance 07-01. txt is included with your downloadable student files. Assume that this program as described in the computer in your organization and that it needs modifications as described in the comments(lines that begin with two slashes at the beginnings of the files. Your job is to alter the program to meet the new specification.
Create a Python file named employee_program.py, open it in your Python editor, and copy your Python template into the new file.
Following your instructor's instructions, define a constant at the top of the file, before def main(), called CONSOLE_WIDTH and assign it the value 80.
Inside the main() function, define all of your hard-coded strings that will be printed for the user. This demonstrates the separation of the output text from the program logic. It also shows how easy it is to change the text to another human language for Internationalization.
program_title = "*** Employee Program ***"
employee_id_prompt = "Please enter the employee ID: "
last_name_prompt = "Please enter the employee last name: "
first_name_prompt = "Please enter the employee first name: "
department_prompt = "Please enter the department name: "
salary_prompt = "Please enter the employee annual salary: "
table_name = "Employee Data"
bar = '-' * CONSOLE_WIDTH
dept_header = "DEPARTMENT"
id_header = "ID"…
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- This is Computer Architecture! The assignment is to create a program that adds the number 200 to itself 500 times in three different variables (a byte, a short, and an int). You are to output the three values on a single line every 10th time to a *.txt file (your program should place your name and the assignment number at the top of this output file). At the top of your program have comments with your name, the assignment number, and a brief description of the program. Also, make certain to have comments within your program. You may do this assignment in Java. Note that Python will not work for this assignment. Make certain that you have your name and the assignment number at the top of your observations file and your code files.arrow_forwardPLEASE COMMENT CODE In a python program, create a new file and call it “ tracking”. Write to it four lines each contains information about an order like this: 1-00654-021 Dell charger Toronto-WEST 99-49-ZAD011-76540-022 ASUS battery Milton-EAST 34-56-CBH561-09239-026 HP HD Scarborough-NORTH 12-98-AZC451-12349-029 Mac FD North York-LAWRENCE 34-49-ZWL01Add the file two more lines: 1-34567-055 Lenovo SSD Milton-ON 34-09-MT04 1-90432-091 Lenovo battery Oakville-ON 78-KL98 Define a function that searches for a brand (e.g. Dell, ASUS, etc.). Test the function in your program.arrow_forwardC programming create a text base game to race 4 cars across the screen and determine the first second and third place. A text file (car.txt) with the name of the driver, type of the race car, car number, and the color of the car is given to you. In addition to the above, the user(s) should be asked if they want to modify their car’s specs. Such as the type of race car (Ford, Chevy, Dodge, etc.), the car number, name of driver, and the color. The user should be able to make changes to their vehicle between each race. The modifications are to be saved to a file. With each key press a random number between 0 and 10 is generated to represent the cars next distance to travel.arrow_forward
- C++ in MS Visual Studio, continues to receive error code E0276 (identifier is undefined) in both header and CPP files. This is new to me but please help. I do use code "using namespace std; I included the header file the identifier is defined in (code - #include "degree.h") , but the compiler doesn't really connect it and wants me to include ..//degree.harrow_forward# file name: w07_markus.py## Complete the following steps:# (1) Complete the following function according to its docstring.# (2) Save your file after you make changes, and then run the file by# clicking on the green Run button in Wing101. This will let you call your# modified function in the Python shell. An asterisk * on the Wing101# w07_markus.py tab indicates that modifications have NOT been saved.# (3) Test your function in the Wing101 shell by evaluating the examples from# the docstring and confirming that the correct result is displayed.# (4) Test your function using different function arguments.# (5) When you are convinced that your function is correct, submit your# modified file to MarkUs. You can find instructions on submitting a file# to MarkUs in Week *2* Perform -> Accessing Part 2 of the# Week 2 Perform (For Credit) on PCRS.# (6) Verify you have submitted the right file to MarkUs by downloading it# and checking that the…arrow_forwardThis exercise involves designing a help-desk priority manager. Helprequests are stored in a text file with the following structure: priority, idof requesting party, time of request The priority is an integer in the range1–5 with 1 being the least important and 5 being the most important.The id is a four-digit employee identification number and the time is inTimeSpan.Hours, TimeSpan.Minutes, TimeSpan.Seconds format. Write aWindows application that, during the Form˙Load event, reads five recordsfrom the data file containing help requests, prioritizes the list using a priority queue, and displays the list in a list box. Each time a job is completed,the user can click on the job in the list box to remove it. When all five jobsare completed, the application should automatically read five more datarecords, prioritize them, and display them in the list boxarrow_forward
- Create a file in your project named employees.txt with the following data (you can simply create the file by hand rather than with Python code): 123 Bob Smith345 Anne Jones256 Carol Lee845 Steve Robert Anderson132 Jill Thompson From your program's main function, give the user the following options: lookup a name based on ID number, lookup an ID number based on name, and quit the program. OPTION 1: The user chooses to lookup a name based on ID number: Use a try/except and ask the user to enter an integer. If they don't enter an integer, print an error message. If they do enter an integer, call a function named lookup_employee which takes the id as a parameter. If an employee with the given id number is found, return the name. Otherwise, return the string “Employee not found” Back in main, print the return result. OPTION 2: The user chooses to lookup an ID based on name: Ask the user to enter the first and last name (don't ask for the middle name). Call a function named…arrow_forwardIn Python Initially, you will prompt the user for the names of two files: one will contain Customer information, and the other will contain Product information, as described below. Sample files are attached (below) to this project so you can download and review them. Some test cases may use other files, which you will not be able to see, so it is important that your program ask the user for the file names, and be able to open and read any file. The Customer Information file will be a csv file, with no header row, in which each line has the following fields, which are separated by commas. Customer_Number Customer_Name Customer_Balance Customer_Password For example, the sample file named customers.csv has several lines, and the first two are: 24155,"Carey, Drew Allison",838.41,Bo7&J 24426,"Butler, Geoffrey Barbara",722.93,Ep5& The Product Information file will be a csv file, with no header row, in which each line has the following fields, which are separated by commas:…arrow_forward***Please write code suitable for Myprogramminglab below: If you have downloaded the source code from this book's companion web site, youwill find the following files in the Chapter 07 folder:• GirlNames.txt--This file contains a list of the 200 most popular names given togirls born in the United States from the year 2000 through 2009.• BoyNames.txt--This file contains a list of the 200 most popular names given toboys born in the United States from the year 2000 through 2009.Write a program that reads the contents of the two files into two separatelists, allows a user to input either a girl's name, a boy's name, orboth, then tells the user whether the name(s) was/were popular between 2000 and2009.First, the program should prompt the user to choose a girl's name, a boy's name,or both by entering either 'girl', 'boy', or 'both.'Once they have chosen, they should be able to input a name. If the name wasa popular name, like Jacob or Sophia, the program should print "Jacob was apopular…arrow_forward
- Draw the following FlowChart in Raptor and upload the Raptor file into the assignment folder. Draw a table variable (for a, b, M) on a paper assuming the user insert M=7 when it is asked by raptor, and upload it to the assignment folder. Which of the following are final values for n and sum, if the user inserts M=7 when it is asked by Raptor? Capital and Lowercase M is similar in this example (m=M) On paper, write what is the purpose of this algorithm. a = 1, b=2, m=7 a = 2, b=4, m=7 a = 8, b=8, m=7 a = 16, b=16, m=7 a = 16, b=16, m=8arrow_forwardCreate a Python file named employee_program.py, open it in your Python editor, and copy your Python template into the new file. Define a constant at the top of the file, before def main(), called CONSOLE_WIDTH and assign it the value 80. Inside a main() function, define all of your hard-coded strings that will be printed for the user. This demonstrates the separation of the output text from the program logic. It also shows how easy it is toarrow_forwardMake a copy of the “Debugging” folder and rename it “Task”.You will be making changes to the debugging.py file in the“Task” folder and leaving the file in the “Debugging” folder asis.● There are bugs in the code that need to be resolved. Debug the Pythoncode and ensure that you get the suggested output as outlined in thecomments at the bottom of the debugging.py file.● For each bug that you have resolved, please leave a comment identifyingthe change that you made debugging.py def print_values_of(dictionary, keys): for key in keys: print(dictionary[k]) simpson_catch_phrases = {"lisa": "BAAAAAART!", "bart": "Eat My Shorts!", "marge": "Mmm~mmmmm", "homer": 'd'oh', "maggie": " (Pacifier Suck)"} print_values_of(simpson_catch_phrases, 'lisa', 'bart', 'homer') ''' Expected console output: BAAAAAART! Eat My Shorts! d'oh! '''arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
C - File I/O; Author: Tutorials Point (India) Ltd.;https://www.youtube.com/watch?v=cEfuwpbGi1k;License: Standard YouTube License, CC-BY
file handling functions in c | fprintf, fscanf, fread, fwrite |; Author: Education 4u;https://www.youtube.com/watch?v=aqeXS1bJihA;License: Standard Youtube License