Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hello, could somebody help me with these solutions please? Need help asap Q1. Cr

ID: 3590904 • Letter: H

Question


Hello, could somebody help me with these solutions please? Need help asap

Q1. Creat a VI that uses a For Loop to generate an array of first 10 numbers of the series 1, 9,25,49. (such that the first number is 1', second number is 32, third number is 5 and so on). The numbers should be displayed in an array of numeric indicators, and also plotted in a waveform graph or chart. (40 points) 02. Create a Vi by using a While Loop that continuously generates a random integer number between 0 to 1000 until it generates a number that matches an integer number selected by the user. Display how many random numbers the VI generated before the matching number into a numeric indicator. (Hint convert the random number between 0 and 1000 to nearest integer value (60 points)

Explanation / Answer

Q1.

import matplotlib.pyplot as plt
x = []
y = []
for i in range(1,100,2):
x.append(i)
y.append(y**2)
plt.plot(x, y, 'ro')
plt.show()

Q2.

import random
userInput = int(input("Enter a number: "))
while True:
a = random.randrange(0,1000)
print(a)
if (a == userInput):
break

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote