Computer Science, asked by BiswaShresikha, 4 months ago

Find the output if the input string is 'Tesť.
(a) S =input("Enter String : ")Test RS = "" for ch in S: RS = ch + RS print(S + RS)
(b) S = input("Enter string : ") RS = " " for ch in S : RS = ch + 2 + RS print(RS + S)​

Answers

Answered by shivanshshrestha002
0

Answer:

>>> s = input()

foo bar baz

>>> s

'foo bar baz'

>>> n = input('Enter a number: ')

Enter a number: 50

>>> print(n + 100)

Traceback (most recent call last):

File "<stdin>", line 1, in <module>

TypeError: must be str, not int

>>> n = int(input('Enter a number: '))

Enter a number: 50

>>> print(n + 100)

150

>>> fname = 'Winston'

>>> lname = 'Smith'

>>> print('Name:', fname, lname)

Name: Winston Smith

Similar questions