Question: Q 1 . Basic Operations with Lists and Arrays You are given the failure times ( in hours ) of five machines as a list:

Q1. Basic Operations with Lists and Arrays
You are given the failure times (in hours) of five machines as a list: failure_times =[50,60,45,90,85]. Write a Python script to:
Find the total operational time (sum of failure times).
Find the average failure time.
Q2. Simple Function for Reliability Classification
Write a Python function is_reliable() that takes a failure time as input and returns 'Reliable' if the failure time is above 70 hours, and 'Unreliable' otherwise. Test this function with a failure time of 85 hours.
Q3. Numpy Basics: Mean and Sum
Using Numpy, create an array of failure times: failure_times = np.array([50,40,60,80,55]). Find:
The total failure time.
The mean failure time.
Q4. Counting Failures Above a Threshold
You have a list of machine failure times: failure_times =[40,95,60,85,55,70,100]. Write a Python script to count how many times a machine failed after running for more than 80 hours.
Q5. Creating and Accessing a Dictionary
Create a dictionary called machine_data where each key is a machine ID and the value is its failure time. Then, retrieve and print the failure time of machine with ID 'Machine_3'.
Q6. Creating Simple Plots
You have failure times for four machines: failure_times =[60,75,45,90]. Plot a simple bar chart using Matplotlib, where the x-axis represents machine IDs (Machine 1, Machine 2, etc.) and the y-axis represents failure times.
Q7. Finding Maximum and Minimum Values
You are given an array of failure times: failure_times = np.array([100,120,90,110,130]). Using Numpy, find:
The maximum failure time.
The minimum failure time.
Q8. Filtering Data
Using a list of failure times: failure_times =[95,50,70,85,60,40,100]. Write a Python script to filter out the failure times that are less than 60 hours and print the remaining times.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!