Showing posts with label Certificate. Show all posts
Showing posts with label Certificate. Show all posts

The Joy of Computing using Python NPTEL Week 9 Programming Assignment 3 Solution 2021 March | Week 9

VIDEO ACADEMY

 The Joy of Computing using Python NPTEL Week 9 Programming Assignment 3 Solution 2021 March | Week 9









Week 9 Programming Assignment 1                                                          Due on 2021-03-25, 23:59 IST
Repetition
Given a list of integers and a value k, you are required to print an integer which appears in the list exactly k times. It is guaranteed that only one integer repeats k times.
Input Format
The first line of the input contains space separated integers.
Second line of the input contains a value n.
Output Format
Print an integer that appears exactly n times.
Example:
Input:
1 2 3 4 3 2 1 2 5 6
3
Output:
2
Explanation
In the given list, 2 appears exactly thrice.


ANSWER:
                   


a,k=list(map(int, input().split())) ,int(input())
print([q  for q in a if a.count(q)==k][0],end="" )




Week 9 Programming Assignment 2                                                           Due on 2021-03-25, 23:59 IST
Panagrams
Given an English sentence, check whether it is a panagram or not. A panagram is a sentence containing all 26 letters in the English alphabet.

Input Format
A single line of the input contains a stirng s.
Output Format
Print Yes or No

Example:
Input:
The quick brown fox jumps over a lazy dog
Output:
Yes
Input:
The world will be taken over by AI
Output:
No



ANSWER :


                                     



import string as st
s=list(input().upper())
if list(st.ascii_uppercase) == sorted(list(set(sorted(s)[sorted(s).index('A'):]))):
    print("Yes",end="")
else:
    print('No',end="")










Week 9 Programming Assignment 3                                                       Due on 2021-03-25, 23:59 IST
Remove Vowels
Given a string s, remove all the vowels in s and reprint the string. The order of other characters in the string should be maintained\\

Input Format
A single line of the input contains a stirng s.

Output Format
Print the modified string after removing the vowels

Example:

Input:
abcdEfghi

Output:
bcdfgh



ANSWER:
   

                              




S,a=list(input()),""
ans=[y for y in S if y!='A'and y!='E'and y!='O'and y!='U'and y!='I'and y!='a'and y!='e'and y!='i'and y!='o'and y!='u' ]
print(a.join(ans),end="")




Hope this post helped you, you must SUBSCRIBE to the channel to get all these updates in time




COURSERA PREMIUM COURSES WITH CERTIFICATES FREE OF COST| Enroll Now

VIDEO ACADEMY

COURSERA offers most popular premium courses with Certification FREE for limited time period.



None of the courses belong to a coursera specialization. This offer is only valid until the end of may 2020. Once you checkout, you will have 180 days to earn a certificate.

           These courses come from ~50 most popular universities including university of   california, harvard university, stanford university, st. Petersburg university, penn, georgia tech, johns hopkins, caltech, duke, and imperial college london. Courses from companies like google and amazon are also included.

  Here is the list of the following courses:



             To get more Information visit our youtube channel VIDEO ACADEMY
 and 
video academy youtube channel