Instructions We will solve the following exercises: Given a list with names prin
Instructions
We will solve the following exercises:
Given a list with names prin
Instructions
We will solve the following exercises:
Given a list with names printed with just the first names, check which is the first name you find starting with the character “a.″
Given a list with the ages of different students, check how many of these values are older than 20.
Create a list with 5 names:
Add a new name.
Remove one of the names.
Print the length of the list.
Given a tuple with names, check how many names have more than 6 characters.
Using a loop and the input command, create a set with 5 names. Check how many of the following names are in that set: “Pablo” and “Ana”
Do not use loops for this second part of the exercise.
Create a dictionary with 5 people and their emails. Now do this:
Extract the email for one of these people.
Add a new person to the dictionary.
Check if the email [email protected] is in the dictionary.
Create a function that receives a list with names, a letter, and a number. The function will check the name in that position. If the name includes the letter given, it will return “Well done”. In other case, it will return nothing.
Example:
Function7([“Anne”,”Charles”,”Otto”,”Pablo”,”John”] , “a”, 3) should return “Well done” because the element in the 3rd position (Pablo) includes the character a.
Create a function that receives a list with numbers and calculates the mean for just the positive ones.
Note: remember to add comments (using the # symbol) in every exercise so that we can check that you have understood the solution given.
Considerations for this assignment
This is an individual assignment, and as such must be completed on your own.
For this assignment, you will submit a single .txt file where you will solve each of the following exercises. For each exercise, you should add a comment at the top with the number of the exercise, for example, Exercise 1.
You should also provide comments that explain how your code works using the # symbol.
You will be evaluated for each exercise for your ability to meet the requirements and your ability to explain how you solved the problem in comments. You should also look at the attached rubric for detailed instructions on how each exercise will be graded.