Question: Q4. Implement function allEven() that takes a list of integers and returns True if all integers in the list are even, and False otherwise. Example:
Q4. Implement function allEven() that takes a list of integers and returns True if all integers in the list are even, and False otherwise.
Example:
>>> allEven([2,4,6,8]) True
>>> allEven([2,4,6,9]) False
>>> allEven([1,4,6,9]) False
Q5. Write a python function, chanceCalc(n), that compute the chance of you hitting Head in n consecutive coin tosses, and return the value.
Example:
>>>chanceCalc(2).0.25
>>> chanceCalc(8) 0.00390625
>>> chanceCalc(1) 0.5
Q6. An isogram is a word without repeating letters. Implement the Python function, isogramChecker() that ask user for a word, determine if the word is an isogram, and return True if it is or False otherwise.
Example: >>> isogramChecker() Enter word: nut
True
>>> isogramChecker() Enter word: transistor
False
>>> isogramChecker() Enter word: Dermatoglyphics
True
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
