I need to complete a Python assignment in which the reinforcement learning algor

I need to complete a Python assignment in which the reinforcement learning algor

I need to complete a Python assignment in which the reinforcement learning algorithm (Q-learning) needs to be implemented to let a robot how to navigate in a maze. The ROS simulation is not required. Follow each step listed in the attached “Project” document to complete the assignment. I will require that you produce the simulation results on a Word document. I also will require the python code used. Please make sure that you look at the rubric and that every step is covered.

Use your text editor to create a .py file containing a Python program that defin

Use your text editor to create a .py file containing a Python program that defin

Use your text editor to create a .py file containing a Python program that defines the following three functions called compute_acceleration(), compute_wavelength(), and compute_distance().
compute_acceleration(force, mass)This function should accept two parameters called force and mass.
It should return force / mass.
Physicists use this handy formula to compute the acceleration of an object with a certain mass when pushed upon by a force of a certain size.
compute_wavelength(frequency)This function should accept one parameter called frequency.
It should return 3E8 / frequency.
Physicists use this handy formula to compute the color of light that has a certain frequency.
compute_distance(speed)This function should accept one parameter called speed.
It should return speed / 73.
Astrophysicists use this handy formula to compute the distance of galaxies and other far-away celestial bodies, given an estimate of the speed that they are moving away from us.

Your assignment is to simulate the progression of a zombie epidemic as it spread

Your assignment is to simulate the progression of a zombie epidemic as it spread

Your assignment is to simulate the progression of a zombie epidemic as it spreads through Portland, Oregon, beginning in the year 2001. This assignment will test whether you can use loops when translating from a problem to a computational solution. Portland’s population in 2001 was 535,753. Suppose that 10 zombies wandered in from the forests of Cascadia and started biting people, turning them into zombies.
Set n_humans = 535753 and n_zombies = 10 in 2001.
Each year, let’s suppose that (n_humans – n_zombies)*0.1 additional people get bitten and turned into zombies. (In other words, 10% of the non-zombies get zombified each year.)
So in 2002,
n_bitten = (n_humans – n_zombies)*0.1 = 53574.3 (you don’t need to round)
The number of humans goes down, and n_humans = previous n_humans – n_bitten = 535753 – 53574.3 = 482178.7 humans in 2002.
And the number of zombies goes up, so n_zombies = previous n_zombies + n_bitten = 10 + 53574.3 = 53584.3 zombies in 2002.
Use your text editor to create a .py file containing a Python program that simulates the zombie epidemic through the year 2029. Each line of your program’s output should show the year, the number of zombies in that year, and the number of humans remaining in that year. Separate these three values with commas on each line.
For example, the first 4 lines that your program prints should look exactly like this:
2001,10,535753
2002,53584.3,482178.7
2003,96443.74,439319.26
2004,130731.29200000002,405031.708
The last line that your program prints should look like this:
2029,267363.3611636978,268399.6388363022
Notice that there are no extra spaces in between the numbers on each line. They are separated only by commas.
Your program should print out one line for each year from 2001 through 2029. Therefore, it should print out 29 lines… no more, no less.

For this assignment you will implement a number of Boolean functions, such as im

For this assignment you will implement a number of Boolean functions, such as im

For this assignment you will implement a number of Boolean functions, such as implies, nand, etc.In this assignment you will implement several Boolean functions that will later enable you to compute their truth tables. In addition, you will implement a function that creates all combinations of Boolean values for n variables.
After running my code I am getting the following error: Would like some one to look at it and fix it the error .

done Answer

In this unit, we explored the overview of the Conditionals and Recursion, which

In this unit, we explored the overview of the Conditionals and Recursion, which

In this unit, we explored the overview of the Conditionals and Recursion, which are the prime requirements for the decision control process in a program. Before completing this assignment, review the reading material below:
Think Python: How to think like a computer scientist Chapter 5 – Conditionals and recursion
Q 1. The following is the countdown function copied from Section 5.8 of your textbook.

def countdown(n):
if n <= 0: print('Blastoff!') else: print(n) countdown(n-1) Write a new recursive function countup that expects a negative argument and counts “up” from that number. Output from running the function should look something like this: >>> countup(-3)
-3
-2
-1
Blastoff!
Write a Python program that gets a number using keyboard input. (Remember to use input for Python 3 but raw_input for Python 2.)
If the number is positive, the program should call countdown. If the number is negative, the program should call countup. Choose for yourself which function to call (countdown or countup) for input of zero.
Provide the following.
The code of your program.
Respective output for the following inputs: a positive number, a negative number, and zero.
An explanation of your choice for what to call for input of zero.

Q 2: You are developing a program that performs a division operation on two numbers provided by the user. However, there is a situation where a runtime error can occur due to a division by zero. To help junior developers learn about error handling in expressions and conditions, you want to create a program deliberately containing this error and guide them in diagnosing and fixing it.
Instructions: Create a Python program that prompts the user to enter two numbers.
Implement a division operation on the entered numbers.
Introduce a condition that raises a runtime error if the second number is zero.
Provide an error message that clearly indicates the cause of the error.
Guide the junior developers in identifying the error message and implementing error handling techniques to handle the division by zero scenario.
Questions: Provide a code demonstrating how to handle the division by zero error.
Output demonstrating the runtime error, including the error message.
Explain the significance of error handling in expressions or conditions, using the division by zero scenario as an example. Discuss the potential impact of not handling this error in a program.
Please provide detailed explanations and code snippets to guide the junior developers in understanding and addressing the division by zero error in Python programs.
Submission Instructions: Submit the solutions to both questions in one document.
The code and its output must be explained technically. The explanation can be provided before or after the code. The descriptive part of your response must be at least 200 words.
Make sure your submission is double-spaced, using Times New Roman, 12-point font, with 1” margins.
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 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 the quality of your analysis, accurate solution of the problem and the quality of your writing.
Reference
Downey, A. (2015). Think Python: How to think like a computer scientist. Green Tree Press

Write your own Python code examples that demonstrate each of the following. Do n

Write your own Python code examples that demonstrate each of the following. Do n

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.

Write a code where you provide the names and working hours of 5 workers as TWO s

Write a code where you provide the names and working hours of 5 workers as TWO s

Write a code where you provide the names and working hours of 5 workers as TWO separate lists as Workers=[Ahmad, Ali, Muhammad, Salih, Waleed], Worker_hours=[20, 45, 32, 38, 50]. The hourly rate is fixed to $2.75. For these workers you have to write a report saying:
For [worker] , who worked for [hours], including [over time] Hours of overtime, for an hourly rate of: [hourly rate] and overtime rate: [overtime rate], his gross pay is: [gross pay].
Note that gross pay is calculated as: Hours * Hourly Rate
An important point is that pay above 40 will get an hourly wage 1.5 time the regular wage
Hint: use len(list([list_name]) to find the number of elements in the list and then make use of while statement. Also note that, in order you refer a particular list element we use listname[index], e.g. in Workers list, Ahmad is at index 0, therefore to refer to Ahmad or the first element we use Workers[0].

1. I have created a python program in Colab that simulates betting on a coin fli

1. I have created a python program in Colab that simulates betting on a coin fli

1. I have created a python program in Colab that simulates betting on a coin flip. https://colab.research.google.com/drive/1WkiDjaLvp…
We start with $25. We have a tip that the coin is unbalanced and lands on heads 60% of the time. This program uses the Kelly criterion to determine how much to bet on heads and tails for each bet. The program runs a sequence of 100 bets and determines the final bankroll. This is then repeated 100 times and the final results are summarized.
A. You are to use this file to estimate what is the probability of losing money (finishing with less than $25 as a function of the number of bets. (10, 20, 40, 80, 100). Always repeat the run 100 times.
B. Same as above but change the probability of heads to 75%
2. I have created a python program in colab that will load the statistics for an arbitrary stock and apply a trading strategy.
https://colab.research.google.com/drive/18hjLCRlCc…
The strategy is to compute the Kelly fraction for the stock and then use it when buying and selling.
The program uses momentum to decide to trade.
If the stock went up yesterday …it is on a roll. Buy.
If the stock went down yesterday … get out while you can. Sell.
I gave an example in class of how Apple stock performed in 2022 and 2023.
Your goal is to find a stock in the S&P 500 that will do the best compared to a buy and hold strategy in each year. I have an idea of what stock is the best for each year, but I don’t know which is the best. That is your job. For 2022 and 2023 report the best stock, the value of buy and hold and the value of the trading bankroll.

In one file, write programs for the tasks below and upload the file (.py) to Bla

In one file, write programs for the tasks below and upload the file (.py) to Bla

In one file, write programs for the tasks below and upload the file (.py) to Blackboard. In the top comments section of the file, please include your name, the date, and the assignment number. While you don’t have to add comments for every line of code, please include comments to tell a reader what you are doing. Commenting your code also suggests to me that you know what you are doing.
While there is no one way to do things, your code should only use commands and methods from class. I do not want you using other commands that you got from the internet.
Also use the #%% command to divide each answer into its own cell. Note also include #%% after the last line of code in the program. the assignment in word file ” assignmet2″ , the power points for the material that can be used. please use the commands that in the power point

# Python Program to calculate the square root # Note: change this value for a di

# Python Program to calculate the square root
# Note: change this value for a di

# Python Program to calculate the square root
# Note: change this value for a different result
num = 8
# To take the input from the user
#num = float(input(‘Enter a number: ‘))
num_sqrt = num ** 0.5
print(‘The square root of %0.3f is %0.3f’%(num ,num_sqrt))