Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Add comments to explain what each line is doing. A comment in Python starts with a # . courses = [ Intro to Computer
Add comments to explain what each line is doing. A comment in Python starts with a #
courses Intro to Computer Science", "Program Design", "Web Design", "ObjectOriented Programming", "Data Structures and Algorithms"
index
vowels AEIOU
favouriteCourses
while index lencourses:
theCourse coursesindex
if theCourse in vowels:
favouriteCourses.appendtheCourse
index
printList of my favourite courses:", favouriteCourses
#Note in particular the line that says if theCourse in vowels: Can you explain what this
#line does? How does the program decide which courses are favourites? Would a course called
#"Graphics" be a favourite? Try adding it to the list and find out!
#Modify the program above so that it selects favourite courses with: names longer than
#letters and also have the letter g in the course name.
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