adplus-dvertising
frame-decoration

Question

What is the output of this program If entered name is
Compscibits ?
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

a.

Compscibits

b.

Compscibits, Compscibits

c.

Comp

d.

None of the mentioned

Posted under Python

Answer: (a).Compscibits

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program If entered name is Compscibits ?