write output . a= input ( "enter marks") # run time value to be entered is 20 print (a*2)
Answers
Answered by
0
Required Answer:-
Given C∅de:
a = input("Enter marks: ") # run time value to be entered is 20
print(a*2)
To Find:
- Output if the entered value is 20. (Language: Python)
Output:
- 2020
Explanation:
- Whenever we take input from the user, the input is considered as string.
- So, here a is considered as string. If 20 is taken as input, then a = "20".
- Now, whenever any string is multiplied with any number n, then the string is repeated n times.
- So, a = "20" and a is multiplied by 2. This means a will be repeated twice. This gives output - "2020" and not 40.
Refer to the attachment.
•••♪
Attachments:
Similar questions
Math,
1 month ago
Computer Science,
1 month ago
English,
3 months ago
English,
3 months ago
Math,
10 months ago