Question: I need this answered in python 3.5 with comments ESTION 3 Loops c (The Collatz sequence) The Collatz sequence is as follows: - Start with

I need this answered in python 3.5 with comments I need this answered in python 3.5 with comments ESTION 3 Loops

ESTION 3 Loops c (The Collatz sequence) The Collatz sequence is as follows: - Start with some given integer n. - If it is even, the next number will be n divided by 2. - If it is odd, multiply it by 3 and add 1 to make the next number. - The sequence stops when it reaches 1. According to the Collatz conjecture, it will always reach 1 . If that is true, you can construct a finite sequence following the aforementioned method for any given integer. Write a program that takes in an integer n from the user, prints out the full sequence, and prints the highest integer in the sequence. Example runs are as follows: (b (Sum of Factors) Write a program that asks the user to enter an integer n, ) finds all the factors of this number (i.e. all of the numbers that divide evenly into n ) and prints the sum of these factors. You can include 1 and n in this sum. Some example runs are as follows

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!