Vous êtes sur la page 1sur 1

Please answer the following questions: Date: 09-05-2019

Test duration – 24 hours

1.a) Does the Boolean expression: (0.1+0.2+0.1 = 0.4) hold true under all circumstances. If yes/no,
please explain in a brief

1.b) How is a string value assigned when there is a need to use both double quote (“) and a single quote
(‘) in a single sentence?

string_kit – My name is Ram and I’m studying in KIT

Also, please calculate the length of the above string “string_kit”

2) Find the INTEGER value of “tip_density” in both the cases mentioned below:

tip_pop = 120000

tip_area = 784 Km2

tip_density = tip_pop/tip_area

Now, let’s say the population increases to 130000, what would be the value of “tip_density”?

i.e; tip_pop = 130000

3) Write a python program to find out the vowel count in the following sentence:

prop = I am located in India, at Tiptur

4) Implement a function named “nearest_square” which takes “limit” as an integer argument and
returns the largest square number below the “limit” (don’t use any inbuilt modules in this program)

For example – print (nearest_square(40)) should return “36” as the output

Note1 - Comments and docstrings (when functions are used) are a must for all the programs written in
python since it will help us differentiate the original solutions from the duplicates

Note2 - The solution to all the programs (python only) should be shared in text format only. This
document can be edited, and solutions can be shared over the same document

Vous aimerez peut-être aussi