Page 1 of 1

Please write PYTHON code for 3 question and shows input and output screenshot!! 1. Write a code that assigns all the on

Posted: Thu May 05, 2022 6:18 pm
by answerhappygod
Please write PYTHON code for 3 question and shows input and
output screenshot!!
1. Write a code that assigns all the one-digit
numbers to a list named numbers, and then prints the square
root of them by iterating through the list
using for loop.
2. Write a code that assigns all the one-digit
numbers to a list named numbers. Assume that we don’t know the
length of this list. Now complete your code such that it changes
the last item on the list numbers with its square
root. So basically, as the last item is number 9, we
want to change this value to the square root of 9 which is 3 (of
course we do not want to just put 3, but to calculate the square
root of the last item).
3. Write a code that assigns 10 different ages to a list.
Then assign 10 other different numbers (ages of 10 other people) to
another list. Concatenate lists together. Then ask the user to
enter their age and check to see if their age is already in the
list or not.