Question: Using Python .. see image for instructions Write a Python program to read the user input n from the cmd. (1) Put all the numbers
Write a Python program to read the user input n from the cmd. (1) Put all the numbers of 22, 22, 23, ...etc until 20 into the first tuple. Print out the tuple as follows. (2) Then append another number 2n+2 into this tuple. Print it out again. (3) insert 31, 32, 33,... etc. until 3 into the first tuple (1) to make the following tuple. Print out the new tuple as follows. H: >python C:\Users as.sabbaghpourhokma Documents\IT2431\Module3\assign3-3.py 4 The first tuple is: (2, 4, 8, 16) The second tuple is: (2, 4, 8, 16, 32) The third tuple is: (2, 3, 4, 9, 8, 27, 16, 81) H:\>python C:\Users aslsabbaghpourhokma\Documeats\IT2431\Module3\assign3-3.py 5 The first tuple is: (2, 4, 8, 16, 32) The second tuple is: (2, 4, 8, 16, 32, 64) The third tuple is: (2, 3, 4, 9, 8, 27, 16, 81, 32, 243)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
