python:we will use the anscombe dataset from the seaborn library
Create a function compare_xy that can be called through apply. This function should be able to accept a vector of any size as parameter and compare the value of the x column with the value from the y column. The function should then return a string indicating if the value of x is greater than the value of y.
python:we will use the anscombe dataset from the seaborn library Create a function compare_xy that can...
Load the titanic sample dataset from the Seaborn library into Python using a Pandas dataframe, and visualize the dataset. Create a distribution plot (histogram) of survival conditional on age and gender - what is the basic relationship between these variables using just visual inspection? Do the results make sense? Why?
For the assignment, we will create a program that will take the annual income and tax rate for from 1 to many tax payers, and compute each payer’s amount of taxes that are due for the year. The amount is calculated by taking each payer’s income, multiply it by the tax rate, yielding their taxes ( taxes = income * taxRate ). Here is the decomposition of tasks: ⦁ Create a structure that contains the tax payer information, the tax...
Python For this one use the random library. First, create a function called getRands that will have a parameter called ceiling. Within that function, create a loop that will loop the 10 times and in each loop, it creates a variable that is an integer between 1 and the number in the variable ceiling. Then test if that integers is less than 3. If it is, print that number. Now call getRands and pass in the argument: 10. You must...
Write a function that determines standart deviation of float array. The function takes dataset as a float array parameter!! And it also return result as a float. (Clue: calculate average first) Definations: σ=√1N Σi =1 N ( xi− x ) σ = standard deviation xi = each value of dataset x (with a bar over it) = the arithmetic mean of the data (This symbol will be indicated as average of dataset) N = the total number of data points...
Explain the purpose of a dataset and describe how to create a dataset called dsEmployee in Visual Studio 2012. Assume you have the following function in the clsDataLayer class. Write the SQL command to select all rows from the tblEmployee table, and write the code to fill the dataset. public static dsEmployee GetEmployee(string Database) { dsEmployee DS; OleDbConnection sqlConn; OleDbDataAdapter sqlDA; sqlConn = new OleDbConnection("PROVIDER=Microsoft.ACE.OLEDB.12.0;" + "Data Source=" + Database); // Write the code here to select all rows from...
Please note that I cannot use the string library function and that it must be coded in C89, thank you! Formatting: Make sure that you follow the precise recommendations for the output content and formatting: for example, do not change the text in the first problem from “Please enter a string of maximum 30 characters:” to “Enter string: ”. Your assignment will be auto-graded and any changes in formatting will result in a loss in the grade. 2.Comments: Header comments...
Create a #define called MAPSIZE. Set to 10. Create global variables DirectionsFilename and MapFilename. Use char arrays and set them to nulls by using {}. Create a structure called RowCol that has two int members called row and col to hold the row and column. Function MoveNorth should have a return value of void and a parameter of a pointer to RowCol. { To move north, you need to subtract 1 from PositionPtr->row. Before doing so, you need to check...
l
Question 2 -JS and Python a) Write JavaScript code to create a function called "sortstingsDesc" that will sort an array of string suppiied as a parameter in descending order. (4) Write Python code to create a function called "addToFront" that will accept two parameters the list of information and the value to be added and place the value to the beginning of the list. [4) b)
Using an appropriate definition of ListNode, design a simple linked list class called StringList with the following member functions: void add (std::string); int positionOf (std::string); bool setNodeVal(int, std::string); std::vector<std::string> getAsVector(); a default constructor a copy constructor a destructor The add() function adds a new node containing the value of the parameter to the end of the list. The positionOf() function returns the (zero-based) position in the list for the first occurrence of the parameter in the list, or -1 if...
Write a C++ program that will count the number of words and vowels in a sentence. Create a bool function called isVowel that accepts a character as a parameter and returns a true if it’s a vowel (aeiou) and false otherwise. Create an int function named countVowels that will accept a string variable as a parameter and will return the number of vowels in it. Call the isVowel function as part of this process. Write an int function named countWords...