Search the-function-is-not-working-i-have-no-idea-why-should-be-just-simple-multipy-by

The function is not working i have no idea why should be just simple multipy by

 
 

Top Questions

1.In this problem and the next one, we’re going to make a very simple spam checker program by just looking ...

ooking at how likely a given email is to be spam based on the words it contains. In particular, in this problem we’re going to count how often words are present in spam emails within some set of training data (which here means a set of emails that have already been marked as spam or not spam manually). We have already started to write a function spam_score(spam_file, not_file, word), which takes in two filenames, along with a target word (a lowercase string). Both filenames refer to text files which must be in the same directory as hw07.py (we’ve provided several such files in hw07files.zip). The text files contain one email per line (really just the subject line to keep things simple) - you can assume that these emails will be a series of words separated by spaces with no punctuation. The first file contains emails that have been identified as spam, the second contains emails that have been identified as not spam. Since you haven’t learned File I/O yet, we’ve provided code that opens the two files and puts the data into two lists of strings (where each element is one line - that is, one email). You then must complete the function, so that it returns the spam score for the target word. The spam score is an integer representing the total number of times the target word occurs across all the spam emails, minus the total number of times the word occurs in not-spam emails. Convert all words to lowercase before counting, to ensure capitalization does not throw off the count.
View More

2.Describe the parallels between cell differentiation, nutrient supply, and final cellular state for the majority of cells involved in the ...

he majority of cells involved in the epidermis, hair follicles/hair growth, and nail synthesis/nail growth. How does the structure of spongy bone support the function of the red bone marrow contained within said bone? How do bones, synovial fluid, tendons, ligaments, and articular cartilage work together to allow synovial joint movement? Please explicitly include the bone feature that allows for tendon/ligament attachment. What is the difference in function between the vertebrae and the intervertebral disks in the vertebral column? Please discuss both the connective tissue subtype for each of these features and how the composition of their extracellular matrix contributes to function Describe the extracellular matrix of bone to someone who isn't familiar with anatomy (this should be a general description of appearance/tactile nature, no specific mention of cells or function is needed) How does hair contribute to the sensory role of the integumentary system? (A short explanation is all that is needed, no in-depth description of associated structures is required for full credit) Back when he was 16, Jordan left eye orbit floor was fractured in a bizarre fencing accident, leaving a few fragments behind inside his skull. Assuming the floor was punctured from above in the maxillary bone and no additional bones were broken, where did the bone fragments end up in his skull? (This should be a particular space in the skull, not a separate bone where the fragments are embedded The skeletal and integumentary systems rely heavily on collagen for function - describe one or more features other than ligaments that involve collagen, and how you would expect function to change in someone with EDS that affected the relevant subtype of collagen
View More

3.Question 1: What is a player’s « reaction function » in a Bertrand game ? Question 2: What is a subgame ...

subgame perfect Nash equilibrium? Question 3: In which situations should we need the mixed extension of a game? Question 4: Find, if any, all Nash equilibria of the following famous matrix game: L R U (2,0) (3,3) D (3,4) (1,2) Question 5: What is the difference between a separating equilibrium and a pooling equilibrium in Bayesian games? Question 6: Give another name for, if it exists, the intersection of the players’ best-response « functions » in a game? Question 7: assuming we only deal with pure strategies, the Prisoner’s Dilemma is a situation with: No Nash equilibrium One sub-optimal Nash equilibrium One sub-optimal dominant profile No dominant profile Question 8: If it exists, a pure Nash equilibrium is always a profile of dominant strategies: True False Question 9: All games have at least one pure strategy Nash equilibrium: True False Question 10: If a tree game has a backward induction equilibrium then it must also be a Nash equilibrium of all of its subgames: Tr 2/2 Question 11: The mixed Nash equilibrium payoffs are always strictly smaller than the pure Nash equilibrium payoffs: True False Question 12: Which of the following statements about dominant/dominated strategies is/are true? I. A dominant strategy dominates a dominated strategy in 2x2 games. II. A dominated strategy must be dominated by a dominant strategy in all games. III. A profile of dominant strategies must be a pure strategy Nash equilibrium. IV. A dominated strategy must be dominated by a dominant strategy in 2x2 games. I, II and IV only I, II and III only II and III only I and IV only I, III and IV only I and II only Question 13: A pure strategy Nash equilibrium is a special case of a mixed strategy Nash equilibrium: True False Question 14: Consider the following 2x2 matrix game: L R U (3,2) (2,4) D (-1,4) (4,3) The number of pure and mixed Nash equilibria in the above game is: 0 1 2 3 Exercise (corresponding to questions 15 to 20 below): assume a medical doctor (M) prescribes either drug A or drug B to a patient (P), who complies (C) or not (NC) with each of this treatment. In case of compliance, controlled by an authority in charge of health services quality, the physician is rewarded at a level of 1 for drug A and 2 for drug B. In case of noncompliance, the physician is « punished » at -1 level for non-compliance of the patient with drug A and at -2 level for non-compliance with drug B. As for the compliant patient, drug A should give him back 2 years of life saved and drug B, only 1 year of life saved. When noncompliant with drug A, the same patient wins 3 years of life (due to avoiding unexpected allergic shock for instance), and when non-compliant with drug B, the patient loses 3 years of life. Question 15: You will draw the corresponding matrix of the simultaneous doctor-patient game. Question 16: Find, if any, the profile(s) of dominant strategies of this game. Question 17: Find, if any, the pure strategy Nash equilibrium/equilibria of this game. Question 18: Find, if any, the mixed strategy Nash equilibrium/equilibria of this game. Questions 19 and 20: Now the doctor prescribes first, then the patient complies or not: draw the corresponding extensive-form game (= question 19) AND find the subgame perfect Nash equilibrium/equilibria (=
View More

4.The function j is defined by j(x) = (8x)^1/2. The function k is defined by k(x) = √3. If f(x) ...

2x) x k(8x), write an equivalent expression equal to f(x) that does not include radicals.
View More

5.A weather balloon has a capacity of 11 ft3 . It is filled with hydrogen at a constant rate. Initially, the balloon ...

itially, the balloon contains 4 ft3 of hydrogen and it takes 14 seconds to com- pletely fill the balloon. (a) At what rate is the balloon filled? (b) Find a linear function V that models the volume of hydrogen in the balloon at any time t. (c) What can you say about the graph of V ? (You do not need to sketch the graph.)
View More

6.A GRAPHING CALCULATOR IS REQUIRED FOR THIS QUESTION. You are permitted to use your calculator to solve an equation, find the ...

lve an equation, find the derivative of a function at a point, or calculate the value of a definite integral. However, you must clearly indicate the setup of your question, namely the equation, function, or integral you are using. If you use other built-in features or programs, you must show the mathematical steps necessary to produce your results. Your work must be expressed in standard mathematical notation rather than calculator syntax. Show all of your work, even though the question may not explicitly remind you to do so. Clearly label any functions, graphs, tables, or other objects that you use. Justifications require that you give mathematical reasons, and that you verify the needed conditions under which relevant theorems, properties, definitions, or tests are applied. Your work will be scored on the correctness and completeness of your methods as well as your answers. Answers without supporting work will usually not receive credit. Unless otherwise specified, answers (numeric or algebraic) need not be simplified. If your answer is given as a decimal approximation, it should be correct to three places after the decimal point. Unless otherwise specified, the domain of a function f is assumed to be the set of all real numbers x for which f(x) is a real number. Let f be a twice-differentiable function such that f′(2)=0 . The second derivative of f is given by f′′(x)=x2e2−x−1 for 0≤x≤6 . (a) On what open intervals contained in 0 View More

7.For the utility function U(x1,x2)=x1x2 which of the following statements is true if consumption of both commodities is strictly positive ...

oth commodities is strictly positive a idc are convex but not strictly convex b the bundle (5,6) is weakly preferred to the bundle (3,10) c commodity 2 is inferior d commodity 1 is a giffen good e none of the above
View More

8.I am working on the below question - discrete mathematics. I am not understanding how to algebraically express whether a ...

ly express whether a function is onto or one to one. For each of the functions below, indicate whether the function is onto, one-to-one, neither or both. If the function is not onto or not one-to-one, give an example showing why. (j) f: Z × Z → Z × Z, f(x, y) = (1-y, 1-x) (k) f: Z+ × Z+ → Z+, f(x, y) = 2x + y.
View More

1.AU MAT 120 Systems of Linear Equations and Inequalities Discussion

mathematicsalgebra Physics