Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Vector selection: the good times ( 4 ) Another way to tackle the previous exercise is by using the names of the vector elements (
Vector selection: the good times
Another way to tackle the previous exercise is by using the names of the vector elements Monday Tuesday, instead of their numeric positions. For example,
pokervectorMonday
will select the first element of pokervector since "Monday" is the name of that first element.
Just like you did in the previous exercise with numerics, you can also use the element names to select multiple elements, for example:
pokervectorcMonday "Tuesday"
Instructions
Select the first three elements in pokervector by using their names:
"Monday" "Tuesday" and "Wednesday" Assign the result of the selection to pokerstart
Calculate the average of the values in pokerstart with the mean function. Simply print out the result so you can inspect it
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started