Question: Need help with Python writing a module with a main: 1) Ask the user for 2 positive integers (use simultaneous input), m,k My answer: m,
Need help with Python writing a module with a main:
1) Ask the user for 2 positive integers (use simultaneous input), m,k
My answer: m, k = eval(input("Enter two different whole numbers, separated by a comma: "))
2) Print the squares of the numbers from 0 to m-1, on one line, separate by spaces
3) Print the cubes of the numbers from 1 to k+1, on one line, separated by commas. Can you do it so there is no comma at the end?
I need help with numbers 2) and 3). The coding in the module should be written with range() and print() functions, and called from the shell (>>> main() ) again and enter different values. Thanks!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
