Title Construct a function that returns a list of remainders from the input.
Catalog Type SLCItem
Persistent ID https://adapt2.sis.pitt.edu/acos/pitt/jsparsons/jsparsons-python/ps?example-id=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://adapt2.sis.pitt.edu/acos/pitt/jsparsons/jsparsons-python/ps?example-id=ps_python_list_of_remainders2&grp=demo&usr=demo&sid=-1&cid=-1
Protocol PITT
Protocol URL
License MIT
Programming Language Python
Natural Language en

Preview