(Introduction to Python) Include your name and program output in a comment at the top of the script you submit. Note: upload a script for example scriptname.py (do not copy-paste the interactive mode commands) Write complete code that asks the user to input two integer numbers. Define and call a function called remainder that takes two parameters x and y and prints the remainder when x is divided by y. When y is zero, it should not perform the division and instead print "cannot divide by zero" to prevent the runtime error. Sample output is as follows: Enter a number: x Enter another number: y Remainder of x divided by y is z (you'll fill in the values of x, y and z)
(Introduction to Python)
Include your name and program output in a comment at the top of the script you submit.
Note: upload a script for example scriptname.py (do not copy-paste the interactive mode commands)
Write complete code that asks the user to input two integer numbers. Define and call a function called remainder that takes two parameters x and y and prints the remainder when x is divided by y. When y is zero, it should not perform the division and instead print "cannot divide by zero" to prevent the runtime error.
Sample output is as follows:
Enter a number: x
Enter another number: y
Remainder of x divided by y is z (you'll fill in the values of x, y and z)
Note: upload a script for example labD.py or scriptname.py (do not copy-paste the interactive mode commands)
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 3 images