What is The Joy of Computing using Python?
Python is a popular programming language that is easy to learn and widely used for various applications such as web development, data science, and artificial intelligence. Learning Python can be a joyous experience as it allows you to create your own programs, automate tasks, and solve real-world problems.
Here are some tips to help you experience the joy of computing using Python:
- Start with the basics: Before diving into advanced topics, it is essential to learn the basics of Python such as syntax, data types, and control structures. This will help you build a strong foundation and make it easier to learn more advanced topics.
- Practice coding: The more you practice coding, the better you will get at it. You can start by writing simple programs and gradually move on to more complex ones. There are also many online resources such as coding challenges and competitions that can help you improve your coding skills.
- Learn from others: There is a vast community of Python developers who are always willing to help and share their knowledge. You can join online forums, attend meetups, and participate in online communities to learn from other developers.
- Use Python libraries: Python has a vast ecosystem of libraries and frameworks that can help you solve complex problems quickly. Some popular libraries include NumPy, Pandas, and Matplotlib for data science, Django and Flask for web development, and Pygame for game development.
- Have fun: Learning Python should be an enjoyable experience, so don't be afraid to experiment and have fun with it. You can build your own projects, such as a simple game, web app, or automation script, to make your learning experience more engaging and enjoyable.
Week 9: Programming Assignment 1
Input:
bananamania
nana
Output:
True
Explanation:
S2 which is nana is in bananamania hence it is a substring of s1.
Example 2:
Input:
aabbcc
abc
output:
False
Explanation:
String s1 does not contain string s2 hence the answer is false.
Solution :
def subStr(s1,s2):
if s2 in s1:
return True
else:
return False
|
Week 9: Programming Assignment 2
Note: Contents of d1 should be appear before contents of d2 in the new dictionary and in same order. In case of duplicate value retain the value present in d1.
Input:
output:
{1: 1, 2: 2, 3: 3, 4: 4}
Solution :
def mergeDic(d1, d2):
d3 = {}
for key,value in d1.items():
d3[key] = value
for key,value in d2.items():
if key not in d3.keys():
d3[key] = value
return d3 |
Week 9: Programming Assignment 3
Input:
122345
Output:
1 0
2 1 2
3 3
4 4
5 5
Explanation:
Given integer 122345. Now printing indexes of numbers from left to right.
First number is 1 and its index is 0 therefore
1 0
Second and third number is 2 and its index is 1,2 therefore
2 1 2
and so on...
Solution :
n = int(input())
n = str(n)
d = {}
for i in range(len(n)):
if n[i] not in d.keys():
d[n[i]] = [i]
else:
d[n[i]].append(i)
for key, value in d.items():
print(key, end= ' ')
for i in value:
print(i, end= ' ')
print() |
CRITERIA TO GET A CERTIFICATE
Average assignment score = 25% of the average of the best 8 assignments out of the total 12 assignments given in the course.
Exam score = 75% of the proctored certification exam score out of 100
Final score = Average assignment score + Exam score
YOU WILL BE ELIGIBLE FOR A CERTIFICATE ONLY IF THE AVERAGE ASSIGNMENT SCORE >=10/25 AND THE EXAM SCORE >= 30/75. If one of the 2 criteria is not met, you will not get the certificate even if the Final score >= 40/100.
| The Joy of Computing using Python | Answers |
| Assignment 1 | Click Here |
| Assignment 2 | Click Here |
| Assignment 3 | Click Here |
| Assignment 4 | Click Here |
| Assignment 5 | Click Here |
| Assignment 6 | Click Here |
| Assignment 7 | Click Here |
| Assignment 8 | Click Here |
| Assignment 9 | Click Here |
| Assignment 10 | NA |
| Assignment 11 | NA |
| Assignment 12 | NA |
Comments
Post a Comment