lab practice exam

If you have any questions on these problems be sure

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: the list [2,4,8,16]. 3. Write a function that takes, as input, a binary string, and returns the reverse of the string. Call this function problem3(myString). For example, problem3(“100011”) should return the string “110001”. 4. Write a function that takes, as input, a positive integer n, and returns a list of all factors of n, starting with 1 and ending with n. Call this function problem4(n). For example, problem4(12) should return the list [1,2,3,4,6,12]. Work these problems out before your discussion section next week. If you have any questions on these problems, be sure to ask one...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online