Question: Write a function geoshape that takes input variable sideCount, specifying the number of sides on a geometric figure, and displays output shape according to following

 Write a function geoshape that takes input variable sideCount, specifying the

Write a function geoshape that takes input variable sideCount, specifying the number of sides on a geometric figure, and displays output shape according to following table. Your script should also catch "Invalid" input and ask for a valid input. You should also copy and paste the script the space below (8 pts) 7. Value of Less than 3 shape Not a shape' Triangle 'Quadrilateral' Pentagon' 4 Greater than 5 Other (8 pts) 8. Write a script newvector that will ask for input vector, a, and then using a while loop, and create a new vector, b, of the same length that satisfy the following condition The item b at the index i should be cube ofthe item a(i) IF a() is less than or equal to 4. If a(i) is greater than 4, then the item b at that indexi should be 0 So running newvector for the input [-10, 2, 5, 13, 4, 0, 9, 15, -7] should give b- [-1000, 8, 0, 0, 64, 0, 0, 0, -343]

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 Databases Questions!