Programming Homework Help

Programming Homework Help. UCF Pytorch Tensors Code Paper

hello, you can find the requirements bellow, i need the code using jupyter

Write some code that uses PyTorch tensors.

  • Create tensors with Python lists with the following dimensions (shapes): 1, 2×3, 2x2x2. Show the tensors’ shapes.
  • Create a 4D tensor with random numbers between 0 and 1. Use the relevant tensor function to do so.
  • Create a 2D tensor with all zeros and another with all ones. Use the relevant tensor function to do so.
  • Using a 4D tensor and using indexing: show a single scalar; show a single vector; show the first scalar from each vector.
  • Demonstrate adding a scalar to every scalar in a 3D tensor (using broadcasting).
  • Demonstrate element-wise dividing a 3D tensor by a vector (using broadcasting).
  • Demonstrate the use of the item() and tolist() functions to get Python values.
  • Demonstrate the use of min() and mean() providing the dim= parameter to find the min/mean over a certain dimension.
  • Combine two 2D tensors so one is “on top” of the other.
  • Reshape a 2D tensor to a 3D tensor.
  • Convert a tensor to single-precision floating point (float32), upload to the gpu, perform an arithmetic operation with another tensor, and then download from the gpu. Demonstrate that these steps worked.

Programming Homework Help

Programming Homework Help

Programming Homework Help. Rutgers University Library Methods Ladder Program

Ladder program 

This program will start by asking the user in a dialog box if they need a ladder and give them, yes and no buttons to click on. If the user clicks no, the program will end.

Use the proper type of dialog box with all arguments (this will be the only dialog box).  

If they click yes, the program will place a ladder against the side of a house (see diagram). 

The program will pick a Math random-sized ladder between 15 and 25 feet (it will be in whole feet).  

The program will lean it against the house at a Math random number of degrees between 60 and 75 (it will be in whole degrees).  

You will then convert the degrees to radians (use the library method).  

You will then calculate the height of the ladder (use the sine of opposite over hypotenuse – the sine of the number of radians times the ladder size).  

You will then calculate the distance of the ladder from the house (forms a right triangle with the ladder as the hypotenuse with hypotenuse squared is the sum of the other 2 sides squared, so solve for the distance). 

You must use the above formulas, all static library methods, and all arguments whenever possible.  

You will then print to the console output screen everything labeled: 

the random size of the ladder

the random number of degrees of the angle where the ladder leans against the side of the house 

the corresponding radians of the angle

the calculated height of the ladder up the house

the calculated distance the ladder is from the house

(all doubles to one decimal place).

Document your program with at least name, exercise number, and at least 5 lines explaining what the program does.  You will also add comments to at least 5 individual lines in the program (comment lines that might not be totally obvious to a novice programmer).  

Run your program 2 times clicking the yes button (to show the random numbers and the calculations are working) and 1 time clicking the no button.

Save the source code .java file and the output .txt file (saved from the Console) from the 2 yes runs.   

Programming Homework Help

Programming Homework Help

Programming Homework Help. Ashworth College Week 6 Exception Handler Discussion Questions

Threaded Discussion Instructions

Review the threaded discussion question posted by the course faculty. You are required to submit at least two (2) responses to this question by 11:59pm EST on Sunday. The first response should be to the faculty; the second response can be directed either to the faculty or to other students in the class. Your responses should be substantive, and reflect analytical and critical thinking skills, as well as, a thorough understanding of your reading assignment. A typical response should consist of 100-150 words in a single-spaced format. Refer to the TDQ Rubric below for more guidance on how to respond.

Write and evaluate an Exception Handler

In a textbox on your form, you ask the user to enter a file name, so that the program can open that file and display it in a TextBox or RichTextBox. There are a number of ways this can end badly, such as:

  • User incorrectly spells file name (or the file doesn’t exist.)
  • User enters no path or the wrong path to the file.
  • The file is on a CD and the CD door is open.
  • The file is on a network and access is denied.

Evaluate the possible exceptions that you might handle, then design and write as much code as you can that will attempt to minimize the possibility of a system crash in this situation.

Rubrics

Programming Homework Help

Programming Homework Help

Programming Homework Help. Speed in MPH Java Programming Project

You are asked to manage a drag race between two racers by recording the drag speed in MPH for each of the players in two separate arrays. The first array is for Player1 and the second array is for Player2. A full competition consists of 5 races. The racer with the highest average speed wins.

What to do?

-declare an array of double for each of the two racers.

-code a function that record the speed for each race.

-code a function that display the outcome for each racer and for each race.

-when the 5 races are finalized, call a function to calculate the average speed for each racer.

-and finally, determine the winner (racer with highest average speed).

Extra credits:

Allow to repeat for another competition (another 5 races) and repeat the process from before. 

It’s can be joptionpane or normal system.out.println format

Programming Homework Help

Programming Homework Help

Programming Homework Help. IGlobal University C Programming Questions

Q.1) Run each of the following codes in your favorite program. All lines to report the execution time. Which algorithm is fastest?

Iterative Approach

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

def fib_iter(n):

a=1

b=1

if n==1:

print(‘0’)

elif n==2:

print(‘0′,’1’)

else:

print(“Iterative Approach: “, end=’ ‘)

print(‘0′,a,b,end=’ ‘)

for i in range(n-3):

total = a + b

b=a

a= total

print(total,end=’ ‘)

print()

return b

fib_iter(5)

TEST THE CODE (Links to an external site.)

Output : Iterative Approach : 0 1 1 2 3

Recursive Approach

1

2

3

4

5

6

7

8

9

10

11

12

def fib_rec(n):

if n == 1:

return [0]

elif n == 2:

return [0,1]

else:

x = fib_rec(n-1)

# the new element the sum of the last two elements

x.append(sum(x[:-3:-1]))

return x

x=fib_rec(5)

print(x)

TEST THE CODE (Links to an external site.)

Output – 0, 1, 1, 2, 3

Dynamic Programming Approach

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

There is a slight modification to the iterative approach. We use an additional array.

def fib_dp(num):

arr = [0,1]

print(“Dynamic Programming Approach: “,end= ‘ ‘)

if num==1:

print(‘0’)

elif num==2:

print(‘[0,’,’1]’)

else:

while(len(arr)<num):

arr.append(0)

if(num==0 or num==1):

return 1

else:

arr[0]=0

arr[1]=1

for i in range(2,num):

arr[i]=arr[i-1]+arr[i-2]

print(arr)

return arr[num-2]

fib_dp(5)

TEST THE CODE (Links to an external site.)

Output – 0, 1, 1, 2, 3

If you found this blog helpful, learn artificial intelligence (Links to an external site.) and power ahead in your career. Learn from the best in the industry and also gain access to mentorship sessions and career assistance.

From <https://www.mygreatlearning.com/blog/fibonacci-series-in-python/#fibonacciDynamic (Links to an external site.)>

Programming Homework Help

Programming Homework Help

Programming Homework Help. CSC 162 CSC 162 Java Phone Book Entry and Palindrome Detector Programs

I’m working on the labs that are explained in the document below.

Please submit the java files that are required accurately and accordingly.


TEACHER’s INSTRUCTIONS: Complete the following Programming Assignment using Recursion. Use a good programming style and all the concepts previously covered. Submit the .java files electronically via this assignment (via a Zip file) regarding the above due date. This also includes UML and Pseudo-Code (which must be in the correct file format).


DUE DATES: IGNORE ANY OTHER DATES MENTIONED

I NEED LAB 1 ASAP and BEFORE MAY 27 11:00 PM EDT

I NEED LAB 2 ON JUNE 3RD, ANY TIME.


Programming Homework Help

Programming Homework Help

Programming Homework Help. IT 227 Academy of Art University Pet App Project

I’m working on a app development project and need support to help me learn.

Hi

I have designed 5 screens on AdobeXD then I open it through anima which converted the design to react code in sandbox. I need the file to open in snack expo.

can you please help me. I can send you an access to have control of my desktop to walk you through the whole thing.

Programming Homework Help