Write a function named 'calculateCube' that uses list comprehension to print a list of cube of a number 1 through 10. Th
Posted: Sun May 15, 2022 1:23 pm
Write a function named 'calculateCube' that uses list
comprehension to print a list of cube of a number 1 through 10.
This function takes a positive integer for an input for which value
of cube would be displayed.
Write a function named 'calculateSquares' that uses list
comprehension to print a list of square of a number 1 through 10.
This function takes a positive integer for an input for which value
of square would be displayed.
Write a code that prompts a user to enter the number between 1 -
10, and enter whether a user wants to print a square or a cube of
that number 1 through 20. When the user enter these two responses
your program will call and execute the matching function and
results would be displayed. For example, if user enters an integer
3 and wants to see first 20 cubes of 3, your program will use 3 as
an input for the function calculateCube, and will display first 20
values for the cube of 3.
Task 3:
Write a function that takes a string as an input and uses list
comprehension to return the vowels and count of vowels in that
string.
Once you complete all three tasks, please submit the screenshots
(with code and output), and your .ipynb file(s).
comprehension to print a list of cube of a number 1 through 10.
This function takes a positive integer for an input for which value
of cube would be displayed.
Write a function named 'calculateSquares' that uses list
comprehension to print a list of square of a number 1 through 10.
This function takes a positive integer for an input for which value
of square would be displayed.
Write a code that prompts a user to enter the number between 1 -
10, and enter whether a user wants to print a square or a cube of
that number 1 through 20. When the user enter these two responses
your program will call and execute the matching function and
results would be displayed. For example, if user enters an integer
3 and wants to see first 20 cubes of 3, your program will use 3 as
an input for the function calculateCube, and will display first 20
values for the cube of 3.
Task 3:
Write a function that takes a string as an input and uses list
comprehension to return the vowels and count of vowels in that
string.
Once you complete all three tasks, please submit the screenshots
(with code and output), and your .ipynb file(s).