Back to Browse

L34: Nested for loops & string operations in python

44.1K views
May 15, 2021
10:39

Welcome to Lecture 34 of the course "Programming in Python" by Prof. Sudarshan Iyengar. Full Course: https://study.iitm.ac.in/ds/course_pages/BSCS1002.html Video Overview In this lecture we explore fundamental string operations in Python through a simple and engaging example. Starting with the string VIBGYOR we demonstrate how to access individual characters using indexing. We then use nested for loops to generate all possible color combinations that two brothers Sharath and Tanmay can wear from the VIBGYOR palette. Finally the program calculates and displays the total number of color combinations. This hands on example illustrates string manipulation loops and basic problem solving in programming. About IIT Madras' online Bachelor of Science programme IIT Madras offers four year BS programmes that aim to provide quality education to all irrespective of age educational background or location. The BS programme has multiple levels which provide flexibility to students to exit at any of these levels. Depending on the courses completed and credits earned the learner can receive a Foundation Certificate from IITM CODE (Centre for Outreach and Digital Education), Diploma(s) from IIT Madras or BSc/BS Degrees from IIT Madras. For more details Visit: https://www.iitm.ac.in/academics/study-at-iitm/non-campus-bs-programmes #python #strings #indexing #loops #nestedloops #programming #coding #vibgyor #combinations #computerscience #sharath #tanmay #beginnerprogramming #tutorial #codeexample #problemsolving

Download

1 formats

Video Formats

360pmp413.5 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

L34: Nested for loops & string operations in python | NatokHD