Skip to content

Commit 6262900

Browse files
Priyanka KarunakaranPriyanka Karunakaran
authored andcommitted
square root exercise
1 parent 8c23718 commit 6262900

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
#Take a user given list of numbers and make a list of all the square roots of the numbers using list comprehension. Use a list comprehension to solve it. Hint: The square root of a number is the same as taking the ½ power of a number.
1+
2+
"""
3+
Problem Name: square_root_list
4+
Take a user given list of numbers and make a list of all the square roots of the numbers using list comprehension. Use a list comprehension to solve it. Hint: The square root of a number is the same as taking the ½ power of a number.
25
#the given code takes an input and makes it a list of numbers
36
#for example, entering “1 23 4” as the input will result in the list [1,23,4]
4-
//for idx in range(len(ex_list)):
5-
// ex_list[idx] = int(ex_list[idx])
7+
ex_list = input().split()
8+
for idx in range(len(ex_list)):
9+
ex_list[idx] = int(ex_list[idx])
10+
"""
611

712
#write your code below

0 commit comments

Comments
 (0)