1. Engineering
  2. Computer Science
  3. lab 1 q1 write a python program with the following...

Question: lab 1 q1 write a python program with the following...

Question details

Lab 1

Q1. Write a Python program with the following function building block.

•All input values are to be taken fro

m the user.
•Ensure to check for possible error cases like mismatch of data type and input out of range,
for every function.

      Function 1:

countVowels(sentence) – Function that returns the count of vowels in a sentence.

Function 2:

Sum of all even numbers between two numbers, identify number of parameters  

Q2. Write a Python program that reads a text file called “perfumes.txt”. A sample of the file is provided below, you may add more details to the file. Each row has a perfume name and respective price. Your program must read the data from the file and identify the most expensive perfume in the list. Sample file is given below.

perfumes.txt
Gucci 415
Prada 435
Cartier 310
Hermes 553
Dior 386
Burberry 369

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution