Python Assign Code H/W

 

Start with the following Python code.  

alphabet = “abcdefghijklmnopqrstuvwxyz”   

test_dups = [“zzz”,”dog”,”bookkeeper”,”subdermatoglyphic”,”subdermatoglyphics”] 

test_miss = [“zzz”,”subdermatoglyphic”,”the quick brown fox jumps over the lazy dog”] 

# From Section 11.2 of: 

# Downey, A. (2015). Think Python: How to think like a computer scientist. Needham, Massachusetts: Green Tree Press. 

def histogram(s):
     d = dict()
     for c in s:
          if c not in d:
               d[c] = 1
          else:
               d[c] += 1
     return d 

Copy the code above into your program but write all the other code for this assignment yourself. Do not copy any code from another source. 

Part 1 

Write a function called has_duplicates that takes a string parameter and returns True if the string has any repeated characters. Otherwise, it should return False.  

Implement has_duplicates by creating a histogram using the histogram function above. Do not use any of the implementations of has_duplicates that are given in your textbook. Instead, your implementation should use the counts in the histogram to decide if there are any duplicates. 

Write a loop over the strings in the provided test_dups list. Print each string in the list and whether or not it has any duplicates based on the return value of has_duplicates for that string. For example, the output for “aaa” and “abc” would be the following. 

aaa has duplicates
abc has no duplicates 

Print a line like one of the above for each of the strings in test_dups. 

Part 2 

Write a function called missing_letters that takes a string parameter and returns a new string with all the letters of the alphabet that are not in the argument string. The letters in the returned string should be in alphabetical order. 

Your implementation should use a histogram from the histogram function. It should also use the global variable alphabet. It should use this global variable directly, not through an argument or a local copy. It should loop over the letters in alphabet to determine which are missing from the input parameter. 

The function missing_letters should combine the list of missing letters into a string and return that string. 

Write a loop over the strings in list test_miss and call missing_letters with each string. Print a line for each string listing the missing letters. For example, for the string “aaa”, the output should be the following. 

aaa is missing letters bcdefghijklmnopqrstuvwxyz 

If the string has all the letters in alphabet, the output should say it uses all the letters. For example, the output for the string alphabet itself would be the following. 

abcdefghijklmnopqrstuvwxyz uses all the letters 

Print a line like one of the above for each of the strings in test_miss. 

Submit your Python program. It should include the following. 

  • The provided code for alphabet, test_dups, test_miss, and histogram. 
  • Your implementation of the has_duplicates function. 
  • A loop that outputs duplicate information for each string in test_dups. 
  • Your implementation of the missing_letters function. 
  • A loop that outputs missing letters for each string in test_miss. 

Also submit the output from running your program. 

Your submission will be assessed using the following Aspects.

  1. Does the program include a function called has_duplicates that takes a string parameter and returns a boolean?
  2. Does the has_duplicates function call the histogram function? 
  3. Does the program include a loop over the strings in test_dups that calls has_duplicate on each string? 
  4. Does the program correctly identify whether each string in test_dups has duplicates? 
  5. Does the program include a function called missing_letters that takes a string parameter and returns a string? 
  6. Does the missing_letters function call the histogram function?
  7. Does the missing_letters function use the alphabet global variable directly?
  8. Does the program include a loop over the strings in test_miss that calls missing_letters on each string?
  9. Does the program correctly identify the missing letters for each string in test_miss, including each string that “uses all the letters”?

Networking and Communication

Assume you are a technical consultant who works with clients to find the best solutions for their networking and communications needs.

Your firm has exclusively served enterprise businesses but it is now branching out to government agencies.

Answer the following question(s):

  1. What are two challenges that you anticipate facing when working with government agencies, or that are simply unique to government agencies? (4 pt)
  2. How would you overcome those challenges? (4 pt)

Fully address the questions in this discussion; provide valid rationale for your choices, where applicable; and respond to at least two other students’ views (2 pt).

Submission Requirements
  • Citation Style: APA
Self-Assessment Checklist
  • I fully addressed the question(s) in the discussion instructions.
  • I included justification or rationale for my choices, where applicable.
  • I responded to at least two other students’ views.
  • I followed the submission guidelines.

Orthocenter Theorem

 Prove the Orthocenter Theorem by geometric arguments: Let T be the triangle on the image plane defined by the three vanishing points of three mutually orthogonal sets of parallel lines in space. Then the image center is the orthocenter of the triangle T (i.e., the common intersection of the three altitudes.  Note that you are asked to prove the Orthocenter Theorem rather than that the orthocenter itself as the common interaction of the three altitudes, which you can use as a fact.
(1)    Basic proof: use the result of Question 1, assuming the aspect ratio of the camera is 1. (20 points)
(2)    If you do not know the  focal length of the camera, can you still find the image center using the Orthocenter Theorem? Can you further estimate the focal length? For both questions, please show why (and then how) or why not.
(3)    If you do not know the aspect ratio of the camera, can you still find the image center using the Orthocenter Theorem? Show why or why not.  

wk 9

Describe in detail one application of machine learning and how the output of analytics has transformed an industry in the past 24-36 months?

Exp19_Excel_Ch12_CapAssessment_Teaching_Schedule

 #Exp19 Excel Ch12 CapAssessment_Teaching_Schedule 

#Exp19 Excel Ch12 CapAssessment_Teaching_Schedule 

#Excelch12CapAssessmentTeachingSchedule

#You have just started your first career as a high school teacher. To  jump start your planning process, you would like to create a teaching  schedule template to help plan your weekly tasks. You will create a  template, create custom macros to automatically insert dates, and  inspect the document for issues.

#     

Clear   all data validation in the range A1:G19.

Delete the sample text in cell   B2

Type Teaching Schedule in cell B1.

Type prepared by: in cell F1.

Delete the value in cell G1.

Add the following comment in   cell G1 Enter Name.

#Type Monday in cell C4 and use the fill handle to fill the   range D4:G4 with the remaining days of the week. 

#Use the document inspector to   inspect the document. Remove  document properties and personal information and   then click close.
 

  Note: Mac users, from the Excel menu, open your preferences, click  Security,   and then click the check box to Remove personal information  from this file on   save.

#Use the accessibility checker to   check the document for issues.  Accept the recommended actions for merged   cells and use the  recommended action to select Rose, Table Style Medium 23.   Close the  accessibility checker pane.

#Record a macro named ClearSchedule using the shortcut   CTRL+SHIFT+J. Add the description When run, this macro clears the values in the schedule  (no period). When run, the   macro should delete the values in cell G1  and in the ranges C3:G3, C5:G6,   C8:G9, C11:G12, C14:G15, C17:G19, in  that order.

Create a form control button   that fills cell F2. Assign the ClearSchedule macro and edit the button text   to Clear.

Create a form control button   that fills cell G2 and edit the button text to Insert Dates.

Open the VBA editor and create a   new module named DateStamp. Create a procedure named InsertDate. Insert the comment Inserts   weekly dates,   then enter the following code Range(“C3:G3”) = Array(Date, Date + 1, Date +   2, Date + 3, Date + 4)   and exit the VBA editor.

Assign the InsertDate macro to   the Insert Dates form control button.

Test both macros and then open   the VBA editor. Locate the module  containing the ClearSchedule macro. Copy   the code and paste it  starting in cell B2 in the Code worksheet. 

Locate the module containing the   InsertDate macro. Copy the code and paste it starting in cell D2.

Check the document for   compatibility with Excel 2010, 2013, and 2016.
 

  Note: Mac users, skip this step.

Exp19_Excel_Ch11_Cap_Donors

 

Exp19_Excel_Ch11_Cap_Donors

 Excel Chapter 11 Capstone – Donors 

Exp19 Excel Ch11 Cap Donors

Project Description:

You are a development officer for a state university. As an officer, you manage a portfolio of important donors who contribute financially to different areas within the university. You categorize the donors based on the college or school for which they want their donations associated. You recently downloaded the portfolio to an Excel workbook. Based on the way the data downloads from the main database, you want to format the text for readability and to make it easier for you to analyze. In addition, you will create an advanced filter to review a list of donors for a particular college or school. Finally, you want to create a look up area to look up data for a specific donor and create a summary section.

1

Start Excel. Download and open   the file named Exp19_Excel_Ch11_Cap_Donors.xlsx.   Grader has automatically added your last name to the beginning of the   filename.

2

The first column displays the   name of the college or school (such as ART   or BUSINESS) associated with each.   You want to assign a three-character code for each college and use that code   to attach to existing donor IDs to create a unique field.
 

  In cell B8, insert the LEFT function to extract the first three characters   from the college name in cell A8. Copy the function to the range B9:B35.

3

You now want to combine the   college ID and donor ID.
 

  In cell D8, insert the CONCAT function to combine the college ID in cell B8   with the donor ID in cell C8 with a hyphen between the two text strings. Copy   the function to the range D9:D35.

4

In cell J8, insert a text   function that displays the college name from cell A8 with just the first   letter capitalized, such as Engineering.   Copy the function to the range J9:J35.

5

The Full Name column displays   last and first names of the donors. You want to display last names only in a   separate column.
 

  In cell F8, type Schneider and use Flash Fill to fill in the last names for   the donors in the range F9:F35.

6

The Address column contains   street addresses, city names, and state abbreviations. To manage the address   list better, you will separate the data into three columns.
 

  Select the addresses in the range G8:G35 and convert the text to columns,   separating the data at commas .

7

The top-left section of the   spreadsheet is designed to be able to enter a donor’s ID, such as ENG-15, and   look up that person’s position in the list, display the donor’s full name, and   display the amount donated this year. The first step is to identify the   position number of the donor ID.
 

  In cell B3, insert the MATCH function to look up the donor ID in cell B2,   compare it to the list in the range D8:D35, and then return the donor’s position   within the list.

8

Now you are ready to use the   position number as an argument within the INDEX function.
 

  In cell B4, insert an INDEX function that uses the range D8:K35, looks up the   row position number from the MATCH function result, and then uses the column   position number for Full Name.

9

In cell B5, insert an INDEX   function that uses the range D8:K35, looks up the row position number
  from the MATCH function result, and then uses the column position number for   Donation.

10

You want to format the results   of the INDEX function.
 

  Format the value in cell B5 as Accounting Number Format with zero decimal   places.

11

To analyze the donor records,   you are ready to create criteria and output ranges. You will enter conditions   to find records for donors to the College of Business who donated $1,000 or   more.
 

  Copy the range A7:K7 to cell A38 to create the column labels for the criteria   range. Type Business in cell J39 and >=1000 in cell K39.

12

You are ready to create the   output area and perform the advanced filter.
 

  Copy the column labels to cell A42. Perform the advanced filter by copying   the records to
  the output area.

13

Now that you created a copy of   the records meeting the conditions, you are ready to enter database functions   in the Summary area.
 

  In cell K2, insert the database function to total the value of the donations   for the records that meet the conditions in the criteria range.

14

In cell K3, insert the database   function to calculate the average donation for the records that meet the   conditions in the criteria range.

15

In cell K4, insert the database   function to count the number of records that meet the conditions in the   criteria range.

16

Format the range K2:K3 with   Accounting Number Format with zero decimal places. Format cell K4 with Comma   Style with zero decimal places.

17

You want to use the FORMULATEXT   function to display the functions.
 

  In cell G2, insert the FORMULATEXT function to display the formula stored in   cell B3.
  In cell G3, insert the FORMULATEXT function to display the formula stored in   cell B4.
  In cell G4, insert the FORMULATEXT function to display the formula stored in   cell D8.
  In cell G5, insert the FORMULATEXT function to display the formula stored in   cell K2.

18

Create a footer with your name   on the left side, the sheet name code in the center, and the file name code   on the right side of the worksheet.

Solved Word_Intro_Cap1_National_Sales_Meeting

Project Description:

In this project, you will apply skills you practiced from the Objectives in Word Chapters 1-3. You will assist Irene Shviktar, the Vice President of Marketing, to edit and create documents for a National Sales Meeting that will precede a Winter Sports Expo sponsored by Front Range Action Sports. The documents include a cover letter from the vice president to the company president. The letter will accompany a packet of materials for the meeting and the expo, which includes a brief resume for the guest speaker, a flyer that will announce the expo, a newsletter for employees, and a research paper on the history and development of skis.

     

1

Open the Word document Student_Word_Cap1_National_Sales_Meeting.docx   downloaded with this Project. Be sure that the rulers and formatting marks   display.

 

2

On the letter on Page 1, select   the first paragraph—Front Range Action   Sports—and increase the Font Size to 28 pt. Change the Font Size of the   next four paragraphs—the address lines and website—to 12 pt.

 

3

Select the first five paragraph   lines that you just formatted, change the Font to Arial, and then with the   text selected, display the Borders and Shading dialog box. Create a 6 pt,   Automatic-colored border on the left side of the selected text.
 

  In the paragraph that begins If you   have any, select the second sentence and move it to the beginning of the   paragraph. Adjust spacing as necessary so that there are no extra blank   spaces at the end of the paragraph.

 

4

On Page 2, in the newsletter,   select the second paragraph of text, which begins with Employee Newsletter. Display the Borders and Shading dialog box,   and then add an Automatic-colored, 3 pt line below the paragraph.

 

5

Starting with the paragraph that   begins National Sales Meeting, select   all of the text from that point to the end of the page, including the   paragraph mark after the word event. Do   not select the Page Break. Change the Spacing After to 6 pt, format the text   in two columns, and apply the Justify alignment.

 

6

At the top of the first column,   select the paragraph National Sales   Meeting. From the Font dialog box, change the Font Size to 20, apply   Bold, and add the Small caps effect. Then Center the paragraph. Apply the   same formatting to the paragraph Winter   Sports Expo.

 

7

On the same page, in the blank   line above the last paragraph of the newsletter, insert the picture from your   downloaded files wCap1_Powder_Skiing.jpg.   If necessary, set the Width of the picture to 3″ and apply a 10 pt   Soft Edges effect.

 

8

In the blank paragraph at the   top of Page 3, insert a 2×3 table. In the first cell of the table, type the   following four lines, pressing ENTER after each line:
 

Robert   Lewis
1227   Aspen Lake Trail
Vail,   CO 81657
www.boblewisskis.com

 

9

In the second row of the table,   in the first cell, type CAREER HIGHLIGHTS and then press TAB. In the second cell of the   second row, insert the text from the downloaded file wCap1_Career_Text.docx and then press BACKSPACE to remove the   blank line at the bottom of the inserted text.

 

10

In the third row of the table,   in the first cell, type EDUCATION and then in the cell to the right, type Mr. Lewis’   educational information as follows, pressing ENTER after each line:
University   of Colorado
Ph.D.   in Psychology
University   of Colorado
M.S.   in Psychology
University   of Minnesota
B.S.   in Psychology

 

11

Insert a new row at the bottom   of the table. In the first cell of the new row, type CONSULTANT and then in the cell to the   right, type the following, pressing ENTER after each line:
U.S.   Junior Ski Team
U.S.   National Ski Team
Special   Olympics

 

12

Apply Bold to the headings CAREER HIGHLIGHTS, EDUCATION, and CONSULTANT. Drag the vertical border between the two columns to   the 1.5-inch mark on the horizontal ruler.

 

13

In the first row, merge the two   cells, and then Center the text. Select Robert   Lewis, increase the Font Size to 24 pt, apply Bold, and then add 24 pt   space Before the text. Select the web address and add 18 pt space after the   text.

 

14

Create a bulleted list, using   solid round black bullets, for the items below SKIING and below COACHING. Apply   Bold to the name of each university, and then apply 12 pt spacing after to   the name of each college degree.

 

15

Select the table, and then   remove all borders. From the Borders and Shading dialog box, add a 3 pt solid   border to the top of the table.

 

16

Near the top of Page 4, in the   paragraph that begins The use of skis, in   the third line, position the insertion point to the right of the period   following wood, and then insert the   following footnote: The oldest known ski and pole is more   than 4,000 years old.

 

17

Modify the footnote style by   changing the Font Size to 11 pt, add a First Line Indent of 0.5″, and   set Line spacing to 2.0 (double).

 

18

In the paragraph that begins The use of skis, position the   insertion point to the left of the period at the end of the paragraph. Using   the MLA format, add the following Book citation:
  Author: Huntford, Roland
  Title: Two   Planks and a Passion: The Dramatic History of Skiing
  Year: 2008
  City: New   York
  Publisher: Continuum Press
 

  In the text, select the Huntford citation   and add the page numbers 4-6

 

19

On Page 6, in the blank line   below the Works Cited title, insert   the built-in Bibliography. Select the two references, change the line spacing   to 2.0 and change the Spacing After to 0 pt. Center the Bibliography title. After the bibliography is entered and   formatted, delete the Works Cited   paragraph.

 

20

On Page 7, select the two   paragraphs below the title that begin Friday   and Saturday, and then change   the Spacing After to 0.

 

21

Select the three paragraphs below the title—the dates—and then from   the Borders and Shading dialog box, apply a Box border using theme color   Blue, Accent 1 (fifth column, first color) and a 3 pt border. Click the   Shading tab, and add Shading using theme color Blue, Accent 1, Lighter 80%   (fifth column, second color).

 

22

Click after the colon at the end   of the line that precedes the bulleted list. Insert the downloaded picture wCap1_Downhill_Skiing.jpg. Change the   Height of the picture to 3.5″, and then set the wrapping to Square.

 

23

Position the picture so that the   Horizontal Alignment is set to Right relative to Column and the Vertical   Alignment is set to Top relative to Line. Apply a Picture Style using the   Soft Edge Rectangle.

 

24

At the bottom of the flyer,   click in the second blank paragraph below the last paragraph of text. Insert   a Basic Process SmartArt (first style under Process). Click the outer   rectangle surrounding the SmartArt to select it, and if necessary, change the   wrapping style to In Line with Text. On the Format tab, set the Height of the   SmartArt graphic to 1″ and the Width to 6.5″. Add the following   text, in order, to the three shapes:
Exhibits
Speakers
Workshops
 

  To the SmartArt graphic, apply the 3-D Polished style.
 

 

25

Save and close the file, and   then submit for grading.

Matlab

A team of students has entered a robot competition, in which their robot must start from a base location, move to and grab objects, and return them to the base to score points. The point values assigned to the objects are 100, 50, and 25 points, depending on their distance from the base. There is a 5-minute time limit for the competition; only objects returned to the base will be counted in the scoring. The team has practiced retrieving all 10 objects; times for completing the round trip to the object and bringing it back to the base, along with the point values of each, are shown in table below:

    Use Excel Solver to determine the objects that should be retrieved within the 5-minute time limit in order to maximize the team’s score.