NPTEL 3 min read Updated Sep 2023

NPTEL The Joy of Computing Using Python Week12 Assignment

Faheem Ahmad

0 reads

The Joy Of Computing Using Python Week 12

NPTEL Course a fun filled whirlwind tour of 30 hrs, covering everything you need to know to fall in love with the most sought after skill of the 21st century. The course brings programming to your desk with anecdotes, analogies and illustrious examples. Turning abstractions to insights and engineering to art, the course focuses primarily to inspire the learner’s mind to think logically and arrive at a solution programmatically. As part of the course, you will be learning how to practice and culture the art of programming with Python as a language. At the end of the course, we introduce some of the current advances in computing to motivate the enthusiastic learner to pursue further directions. The Joy of Computing using python is a fun filled course offered by NPTEL. The Joy Of Computing Using Python Week 12 Assignment.

INTENDED AUDIENCE :  Any interested audience
PREREQUISITES :  10th standard/high school
INDUSTRY SUPPORT :  Every software company is aware of the potential of a first course in computer science. Especially of a first course in computing, done right.

Course Layout

  • Motivation for Computing
  • Welcome to Programming!!
  • Variables and Expressions : Design your own calculator
  • Loops and Conditionals : Hopscotch once again
  • Lists, Tuples and Conditionals : Lets go on a trip
  • Abstraction Everywhere : Apps in your phone
  • Counting Candies : Crowd to the rescue
  • Birthday Paradox : Find your twin
  • Google Translate : Speak in any Language
  • Currency Converter : Count your foreign trip expenses
  • Monte Hall : 3 doors and a twist
  • Sorting : Arrange the books
  • Searching : Find in seconds
  • Substitution Cipher : What’s the secret !!
  • Sentiment Analysis : Analyse your Facebook data
  • 20 questions game : I can read your mind
  • Permutations : Jumbled Words
  • Spot the similarities : Dobble game
  • Count the words : Hundreds, Thousands or Millions.
  • Rock, Paper and Scissor : Cheating not allowed !!
  • Lie detector : No lies, only TRUTH
  • Calculation of the Area : Don’t measure.
  • Six degrees of separation : Meet your favourites
  • Image Processing : Fun with images
  • Tic tac toe : Let’s play
  • Snakes and Ladders : Down the memory lane.
  • Recursion : Tower of Hanoi
  • Page Rank : How Google Works !!

Programming Assignment 1

Question 1 : Sentence: Write a program that accepts sequence of lines as input and prints the lines after making all characters in the sentence capitalised.

Python
lines = []
n = int(input())
for i in range(n):
    s = input()
    if s:
        lines.append(s.upper())
    else:
        break;

for sentence in lines:
    print(sentence)

Programming Assignment 2

Question 1 : Letters: Write a program that accepts a sentence and calculate the number of upper case letters and lower case letters.

Python
s = input()
d={"UPPER CASE":0, "LOWER CASE":0}
for c in s:
    if c.isupper():
        d["UPPER CASE"]+=1
    elif c.islower():
        d["LOWER CASE"]+=1
    else:
        pass
print(d['UPPER CASE'],d['LOWER CASE'])

Programming Assignment 3

Question 1 : Email ID: Assuming that we have some email addresses in the “username@companyname.com” format, please write program to print the company name of a given email address. Both user names and company names are composed of letters only.

Python
import re
emailAddress = input()
pat2 = "(\w+)@(\w+)\.(com)"
r2 = re.match(pat2,emailAddress)
print(r2.group(2))

// written by

Faheem Ahmad

Writer at Techies Talk

Faheem writes about NPTEL, Coursera, and How To on Techies Talk, turning tricky topics into guides you can follow step by step.

Writes about #NPTEL117 #Coursera13 #How To5

Articles
144
Reads
41
Writing since
2020
All posts by Faheem

Leave a Reply

Your email address will not be published. Required fields are marked *