Question: Write a python program that takes 10 integers as input from the user. Your program should then create and print a tuple based on

Write a python program that takes 10 integers as input from the user. Your program should then create and

Write a python program that takes 10 integers as input from the user. Your program should then create and print a tuple based on the following two conditions: a. If the sum of all the inputs is even, then create a tuple of those inputs by arranging the even numbers at the start of the tuple and odd numbers at the end of the tuple. b. If the sum of all the inputs is odd, then the odd numbers will be at the start and even numbers at the end of the tuple. Sample Input 1: 86 64 95 43 52 27 38 77 19 44 Sample Output 1: (95,43,27,77,19,86,64,52,38,44) Explanation: Sum of the inputs is 545. Since the sum is odd, odd inputs are arranged at the start and even inputs are arranged at the end of the tuple.

Step by Step Solution

3.38 Rating (151 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Python version 38 read the input of 10 integers separated by spaces as a string numberstr input extr... View full answer

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 Programming Questions!