10. What is the output of the following?
What is the output of the following?
print ("foo" * 3)
print (2 ** 3)
Pick ONE option
Answers
Answered by
0
Answer:
A joint is the part of the body where two or more bones neet to allow movement
Explanation:
Generally speaking the greater the range of movement,the higher the risk of injury because the strength of the joints is reduced .The six types of freely movable joint include ball and socket, saddle, hinge,condyloid and gliding.
Answered by
0
The output is
foofoofoo
8
- In the given code "foo" is a string of length 3.
- The * operator in python is generally used for multiplication in python. It performs a similar operation on strings. It replicates the string the required number of times.
- Here the * is followed by 3 which indicates that the string "foo" should be replicated 3 times. Hence the output "foofoofoo" is printed.
- In python, is an exponential operator. a ** b is similar to pow(a,b). It calculates the value aᵇ.
- In the given code 2 ** 3 is the same as 2³. Value of 2³ = 8. Hence output 8 is printed.
- Both the outputs are printed in different lines since there is no restriction imposed on print statement like "end".
#SPJ2
Similar questions
Computer Science,
3 months ago
Hindi,
3 months ago
India Languages,
3 months ago
Math,
6 months ago
Biology,
6 months ago
Geography,
10 months ago
Chemistry,
10 months ago