In this assignment I want to use a simplified data to create a simple linear regression model. This link is where the data can be found https://www.kaggle.com/harlfoxem/housesalesprediction/download
My code snippets are attached as screenshots.
I’ve split the data to train and test datasets. Can you check if 2a) In [85] is correct? How can I use best_guess_predictor as a single predictor and build a simple linear regression model? I need the most help with problem 3b, but I would like my previous answers checked for inaccuracies.
Category: Python
https://drive.google.com/file/d/1Sx-OjkdNRR4oIw3Ze… the google drive is the z
https://drive.google.com/file/d/1Sx-OjkdNRR4oIw3Ze…
the google drive is the zip file for the project. The instructions is included in the pdf file.
I have project instructions, requirements, and the output that is attached. Plea
I have project instructions, requirements, and the output that is attached. Please use the Jupiter Notebook file and write the code to get exactly the same output. I need the whole code in one cell
Given: # Run cell to import libraries
import geopandas as gpd
import pandas as pd
import matplotlib.pyplot as plt
import contextily
import mapclassify
import folium
import aiohttp
import fsspec
# This loads geodataframe contaning county geometry shapes
c = “https://github.com/babdelfa/gis/blob/main/counties_geometry.zip?raw=true”
import fsspec
with fsspec.open(c) as file:
county_shapes = gpd.read_file(file)
# This loads the most recent covid19 data from Johns Hopkins University’s Github
url_cases = “https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_US.csv”
df_cases = pd.read_csv(url_cases)
url_deaths = “https://github.com/CSSEGISandData/COVID-19/raw/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_deaths_US.csv”
df_deaths = pd.read_csv(url_deaths)
Introduction Welcome to Unit 2! One of the most powerful features of a programm
Introduction
Welcome to Unit 2!
One of the most powerful features of a programming language is its ability to manipulate variables, expressions, compositions, etc. Another fantastic aspect of computer programming is the use of functions to increase programming efficiency. You will learn about both of these concepts as you read through the resources provided in this unit. You will be introduced to effective programming, including variables, expressions, statements, order of operations, functions, composition, and debugging.
The reading for Unit 2 offers a comprehensive study concentrating on:
the use of arguments and parameters in Python functions
the integration of Python variables, operators, and expressions
the development of arguments-taking Python functions
the use of nested functions.
You will advance to the next level of programming skills once you write Python programs with nested functions.
Atribution”Computer Program Language Text” by Jorge Jesus is licensed under CC BY-NC 2.0. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc/2.0/?ref=openverse.
Reading Assignment
Reading Assignments are designed to expand your knowledge of the topics introduced in the Overview and provide the knowledge you will need to successfully complete the assignments in this unit. As you read through the learning resource and watch the videos consider the following:
Why do we use functions?
How do you distinguish between fruitful and void functions?
Think Python: How to think like a computer scientistChapter 2 – Variables, expressions, and statements Chapter 3 – Functions
Watch: Introduction to programs data types and variables
Watch: Fun with strings
ReferencesDowney, A. (2015). Think Python: How to think like a computer scientist. Green Tea Press. https://greenteapress.com/thinkpython2/thinkpython2.pdf
Khan Academy. (2011, June 30). Introduction to programs data types and variables [Video]. YouTube. http://youtu.be/husPzLE6sZc
Khan Academy. (2011, June 30). Fun with strings [Video]. YouTube. http://youtu.be/iZAtkS0F-Zo
Discussion Assignment
Welcome to the Unit 2 Discussion Forum.
Write your own Python code examples that demonstrate each of the following. Do not copy examples from the book or any other source. Try to be creative with your examples to demonstrate that you invented them yourself.
Example 1: Define a function that takes an argument. Call the function. Identify what code is the argument and what code is the parameter.
Example 2: Call your function from Example 1 three times with different kinds of arguments: a value, a variable, and an expression. Identify which kind of argument is which.
Example 3: Construct a function with a local variable. Show what happens when you try to use that variable outside the function. Explain the results.
Example 4: Construct a function that takes an argument. Give the function parameter a unique name. Show what happens when you try to use that parameter name outside the function. Explain the results.
Example 5: Show what happens when a variable defined outside a function has the same name as a local variable inside a function. Explain what happens to the value of each variable as the program runs.
The code and its output must be explained technically whenever asked. The explanation can be provided before or after the code, or in the form of code comments within the code. For any descriptive type question, Your answer must be at least 150 words.
End your discussion post with one question related to programming fundamentals learned in this unit from which your colleagues can formulate a response or generate further discussion. Remember to post your initial response as early as possible, preferably by Sunday evening, to allow time for you and your classmates to have a discussion.
Your instructor will grade this assignment using this rubric.
Programming Assignment
Assignment instructionsIn this unit, we explored the basic concepts of Python variables, operators, and expressions in Python and construct Python functions that take arguments. Before completing this assignment, review the reading material listed below:
Think Python: How to think like a computer scientist Chapter 2 and 3
Ensure that you go through all the topics in chapters 2 and 3, including the examples and solving the questions in the exercises.
Part 1
The circumference of a circle is calculated by 2πr, where π = 3.14159 (rounded to five decimal places). Write a function called print_circum that takes an argument for the circle’s radius and prints the circle’s circumference.
Call your print_circum function three times with different values for radius.
Include the following in your part 1 submission:
The code for your print_circum function.
The inputs and outputs to three calls of your print_circum.
Part 2
Welcome to your first project. Develop a catalog for a company. Assume that this company sells three different Items. The seller can sell individual items or a combination of any two items. A gift pack is a special combination that contains all three items. Here are some special considerations:
A. If a customer purchases individual items, he does not receive any discount.
B. If a customer purchases a combo pack with two unique items, he gets a 10% discount.
C. If the customer purchases a gift pack, he gets a 25% discount.
Write a function for the above scenario. Perform the calculations in code wherever applicable. The function should be your own creation, not copied from any other source. The final output should look like:
Include the following in your part 2 submission:
The code for the function that you created.
The Output of the code.
A description of what feature(s) your function illustrates.
The code and its output must be explained technically. The explanation can be provided before or after the code, or in the form of comments within the code.
If you use an informational source, be sure to identify the source and share the link to the source you used.
Submission Instructions: Submit the solutions to both part 1 and part 2 in one-word document.
Make sure your submission is double-spaced, using Times New Roman, 12-point font, with 1” margins.
The descriptive part of your response must be at least 200 words.
Use sources to support your arguments. Use high-quality, credible, relevant sources to develop ideas that are appropriate for the discipline and genre of the writing.
Use APA citations and references to support your work. Add a reference list at the end of the submission. For assistance with APA formatting, view the Learning Resource Center: Academic Writing.
Your submission should be clearly written, concise, and well organized, and free of spelling and grammar errors. The grading will be based on accurate solution of the problem and the quality of your writing.
This assignment will be assessed by your instructor using the rubric available on the assignment page located on the course main page.
Reference Downey, A. (2015). Think Python: How to think like a computer scientist. Green Tree Press.
https://greenteapress.com/thinkpython2/thinkpython2.pdf
Data profiling and preparation. The logins to the assignment will be provided af
Data profiling and preparation. The logins to the assignment will be provided after acceptance however to make sure that you have an understanding of what you need to be do, i will upload the instructions below. Thank you.
Using the attached comma delimited file: Make a line chart for each of the 5 dat
Using the attached comma delimited file:
Make a line chart for each of the 5 data fields in the file
Clean the data making decisions about missing values and values that are out of range
Make a new set of line charts
Write up your thoughts on the differences.
There is a file I cannot upload it. I will upload it as a Google Drive.
Homework 4 In this HW, we will study the pay gap between men and women who have
Homework 4
In this HW, we will study the pay gap between men and women who have jobs in San Francisco. We will use the following two csv files to accomplish this task.
Salaries.csv : contains salaries for over 100K employees in SF from 2011 to 2014.
Names.csv : contains baby names from 1980 to 2014 along with counts of how many times the given baby name was used.
We would like to find the average salary of men and women over all jobs from 2011 to 2014. The problem, however, is that the Salaries.csv does not contain gender. Futher, there are many names that are unisex. Since we have counts in the file Names.csv, we use a majority vote to label the gender of each name in Names.csv.
You will be asked to write a series of functions to implement this task.
Note: Unlike previous homeworks, the problems in this homework are inter-dependent in the sense that you can only pass the test for problem n if you have passed the test cases in problem n-1, since normally problem n requires to call the function in problem n-1.
A good amount of code has been done on the backend. Nothing has been done with t
A good amount of code has been done on the backend.
Nothing has been done with the UI or character art for the gameplay.
The art style is up to you, just make it look respectability good.
Game State flow :
1.Story Screen
2. Game Rule Screen
3. Character Select Screen
4. Gameplay Screen, and finally to the
5. End Game Screen.Here’s an outline progression for your Rock-Paper-Scissors project, tailored for other coders to follow:
Project Overview:
Title: MMA-Themed Rock-Paper-Scissors Game
Art Style: Pixel Art
Theme: Mixed Martial Arts (MMA)
Game Progression:
Title Screen:Display game title with pixel art logo.
Include Start button with hover effect.
Background should reflect MMA theme, possibly a pixel art ring or arena.
Story Screen:Narrate backstory or goal of the game using scrolling text.
Include “anyway” in the lower right to proceed.
Character Select Screen:Present two fighters, “Mike” and “Tyson,” in pixel art.
Display character names and numbers ‘1’ and ‘2’ for selection.
Confirm selection and transition to gameplay.
Gameplay Mechanics:Players engage in RPS battles with each round represented as a fight exchange.
Implement timed rounds with a 5-second decision window.
Player inputs: “R” for Rock, “P” for Paper, “S” for Scissors.
If no input within the time limit, CPU wins by default.
Health Bars:Display health bars above characters (100 points each).
Adjust health according to the RPS outcome rules:Rock win adds 20, loss deducts 20.
Paper win adds 10, loss no change.
Scissors win adds 50, loss deducts 40.
Health can exceed 100 points.
UI Elements:Health status, round number, and timer displayed on-screen.
Display current choice icons for player and CPU during each round.
Show fight animations or effects based on round outcomes.
End Game:Game concludes when either fighter’s health drops to 0.
Display winner and option to restart or exit.
Settings/Options (Optional):Sound/Music toggle.
Control instructions.
Credits Screen (Optional):Acknowledge contributors, assets sources, and any third-party tools or libraries used.
Technical Considerations:
Code should be modular, separating logic for easier maintenance and updates.
Follow Pygame’s best practices for handling events, game states, and rendering.
Assets must adhere to the pixel art style and be consistent with the MMA theme.
Rules Documentation:
Provide a detailed ruleset within the codebase (as comments or a separate document) to ensure clarity for future developers.
This outline serves as a blueprint for the development process, ensuring that coders have a clear understanding of the project flow, thematic elements, and specific game mechanics to impleme
I want 1 python file that has all the classes from the UML diagram (make improve
I want 1 python file that has all the classes from the UML diagram (make improvements/ adjustments in the code if needed).
make sure to create and include all classes, attributes and functions.
lab 6 has some of the functions, but generally is an old prototype.
Lab 7 has an almost complete GUI, all that’s needed is a leaderboard (it shows the score of each player), an exit button (to change the current player), and a login as “Admin” or “Player” button.
Requirements: Use the multi-agent framework introduced in Lecture 11, “Future o
Requirements:
Use the multi-agent framework introduced in Lecture 11, “Future of Data Integration”, i.e., AutoGen (microsoft/autogen: Enable Next-Gen Large Language Model Applications. https://github.com/microsoft/autogen) to develop an application (could be as simple as a notebook example)