What will be the output of the following Python code? (If entered name is examveda)
import sys
print 'Enter your name: ',
name = ''
while True:
c = sys.stdin.read(1)
if c == '\n':
break
name = name + c
print 'Your name is:', name
import sys
print 'Enter your name: ',
name = ''
while True:
c = sys.stdin.read(1)
if c == '\n':
break
name = name + c
print 'Your name is:', nameA. examveda
B. examveda, examveda
C. Exa
D. None of the mentioned
Answer: Option A

Join The Discussion