Title Construct a function that returns a list of remainders from the input.
Catalog Type SLCItem
Persistent ID https://acos.cs.vt.edu/html/jsparsons/jsparsons-python/ps_python_list_of_remainders2
Platform Name jsParsons
Features
Description Construct a program which calculates the remainder of each element of the first list and the element with the same index in the second list. The remainders are stored in a new list. If the number in the second list is 0, the program should directly add number 2 to the new list instead of the remainder. Finally, the program should print the new list.
Keywords
Author Kamil Akhuseyinoglu
Institution University of Pittsburgh
Iframe URL https://acos.cs.vt.edu/html/jsparsons/jsparsons-python/ps_python_list_of_remainders2
Protocol SPLICE
Protocol URL
License MIT
Programming Language Python
Natural Language en

Preview

SPLICE Output