मराठी

Find the output of the following program segment: country = 'INDIA' for i in country: print (i) - Computer Science (Python)

Advertisements
Advertisements

प्रश्न

Find the output of the following program segment:

country = 'INDIA'
for i in country:
      print (i)
टीपा लिहा

उत्तर

The variable 'country' will act as a list of characters for the loop to iterate.

OUTPUT:
I
N
D
I
A

shaalaa.com
The ‘For’ Loop
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 6: Flow of Control - Exercise [पृष्ठ १४०]

APPEARS IN

एनसीईआरटी Computer Science [English] Class 11
पाठ 6 Flow of Control
Exercise | Q 5. (iii) | पृष्ठ १४०
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×