Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Note: please familiarize yourself with basic if else in python, and the range function to create loops. Question 1 : A list lst contains [

Note: please familiarize yourself with basic if else in python, and the range
function to create loops.
Question 1:
A list lst contains
["one", "two", "three, "four", "five", "six", "seven", "eight", "nine", "ten"].
Modify the list so that it contains the following (as you can see, instead of two it
says one plus one, instead of three it says one plus one plus one).
["one", "one plus one", "one plus one plus one", "one plus one plus one plus one" ..
and so on.
Question 2:
A string contains "Hello this is a beautiful morning". Create a and print to the
screen a new string that stores the same content, but with the word beautiful
removed.
Question 3:
A list contains the following:
Each entry in the list contains a name, student ID, and a list of three grades.
For each student, print the Average of all grades, and the maximum and
minimum. Print the student name with the highest average. Question 4:
Input a Canadian Postal code of the form LDL DLD as a string (where L is a letter
in [A-Z] and D is a digit in [0-9]. There is a space in between. You are to verify
that the postal code is in this form. If not, you need to output an error message.
For example, K2K9H5 is a valid postal code. All letters need to be upper case.
Question 5:
Given any string composed of any character. Your program will output to the
screen the number of a's in the string, the number of b's, the number of c's, as
well as the number of all other characters (non a, b, or c ).
Each question is worth 5 points.
You will be graded as follows for each problem:
60% of points for the correctness of the logic.
10% points for using proper messages in your program.
10% point for documentation (inserting proper comments).
20% points for a professional judgment of your overall solution.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions