Fundamentals of Software Development
Fundamentals of Software Development
Fundamentals of Software Development
ASSIGNMENT - 1
SUBMITTED TO :
SUBMITTED BY :
SUBMITTED DATE :
Questions
1. You are required to design a complete system which will enable you to
calculate the actual amount of salary which an employee is to obtain from
the company based on the income tax provided below.
Answer:
Pseudo code
Start
Input Salary(S)
If S < 3000
Print S
Else if 3000<S<5000
B= 6 / 100 * S
Print B
Else if 5000 < S < 7000
B = 8 / 100 * S
Print B
Else if 7000 < S < 8000
B = 12 / 100 * S
Print B
Else if 8000 < S < 9000
B = 16 / 100 * S
Print B
Else
B = 40 / 100 * S
End if
End
Flowchart
2. Find simple interest. Write pseudo code and draw a flowchart. SI = (P
* T * R) / 100. IF SI value is greater than 20, print “Greater”.
Answer:
Pseudo code
Start
Input (P, R, T)
SI = (P * R * T) / 100
If SI > 20
Print “Greater”
End
Flowchart
Python is a popular high-level programming language that was created in the late
1980s by Guido van Rossum. It is a versatile, object-oriented, and interpreted
language that is widely used in various areas, including web development, data
analysis, artificial intelligence, scientific computing, and more.
1. Easy to Learn: Python has a simple and easy-to-learn syntax that makes it a
great choice for beginners.
2. Interpreted: Python is an interpreted language, which means that it does not
need to be compiled before execution. This makes it easy to write and test
code quickly.
3. Object-Oriented: Python is an object-oriented language, which means that it
supports the concepts of classes and objects, encapsulation, inheritance, and
polymorphism.
4. Dynamically Typed: Python is dynamically typed, which means that the data
type of a variable is determined at runtime.
5. Large Standard Library: Python comes with a large standard library that
provides a range of tools and modules to accomplish various tasks.
6. Cross-Platform: Python can be run on multiple platforms, including Windows,
Linux, and macOS.
7. Extensible: Python can be extended using various modules, libraries, and
frameworks.
8. Popular: Python is one of the most popular programming languages, with a
large and active community of developers.
Overall, Python is a versatile and powerful language that is well-suited for a wide
range of applications.
To become very good at Python, you can follow these steps:
1. Learn the basics: Start with the basics of Python, including variables, data
types, functions, control flow, loops, and input/output. You can find many
resources online, including tutorials, books, and videos.
2. Practice coding: Practice writing code in Python as much as possible. Try
solving problems, working on small projects, and experimenting with different
features of the language.
3. Work on real-world projects: Try to work on real-world projects to gain
practical experience. This can help you to apply what you have learned and
develop your skills further.
4. Read Python documentation: Read the official documentation for Python and
its libraries. This can help you to understand the language and its features in
more detail.
5. Participate in online communities: Join online communities such as Stack
Overflow, Reddit, and GitHub, where you can ask questions, share your code,
and collaborate with other developers.
6. Attend Python events: Attend local Python meetups or conferences to meet
other Python developers and learn more about the language.
7. Learn from others: Learn from other experienced Python developers by
reading their code, collaborating on projects, and asking for feedback.
8. Keep up-to-date: Keep up-to-date with the latest trends, libraries, and
frameworks in the Python ecosystem. Follow blogs, newsletters, and podcasts
to stay informed.
1. Web Development:
python
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
return 'Hello, World!'
if __name__ == '__main__':
app.run()
2. Data Analysis:
python
import pandas as pd
data = pd.read_csv('data.csv')
mean = data['values'].mean()
std = data['values'].std()
print('Mean:', mean)
print('Standard deviation:', std)
3. Artificial Intelligence:
python
import tensorflow as tf
model = tf.keras.Sequential([
tf.keras.layers.Dense(64, activation='relu'),
tf.keras.layers.Dense(10, activation='softmax')
])
model.compile(optimizer='adam', loss='categorical_crossentropy',
metrics=['accuracy'])
4. Scientific Computing:
python
import numpy as np
plt.plot(x, y)
plt.show()
5. Automation:
python
import os
directory = '/path/to/directory'
These are just a few examples of the many different scenarios where Python can be
used. The syntax and functionality of Python can be adapted to many different
situations, making it a versatile and powerful language.
Course Syllabus:
1. Week 0: Scratch
2. Week 1: C
3. Week 2: Arrays
4. Week 3: Algorithms
5. Week 4: Memory
6. Week 5: Data Structures
7. Week 6: Python
8. Week 7: SQL
9. Week 8: HTML, CSS, JavaScript
10. Week 9: Flask
11. Week 10: Ethics
Course Format: The course is self-paced and consists of video lectures, quizzes,
problem sets, and programming assignments. There are also optional discussion
forums and live office hours with course staff. The course can be audited for free or a
verified certificate can be obtained for a fee.
Prerequisites: No prior programming experience is required. The course is designed
for beginners.
Asia Pacific University (APU) in Malaysia also offers courses in Python. Here are
some details:
Course Syllabus:
1. Introduction to Python
2. Control Structures
3. Functions
4. Lists and Tuples
5. Dictionaries
6. Modules
7. File Handling
8. Object-Oriented Programming
9. Classes and Objects
10. Inheritance and Polymorphism
11. Exceptions and Debugging
12. GUI Programming
13. Database Connectivity
Course Format: The course is taught on-campus and consists of lectures, tutorials, and
practical sessions. Students will work on programming assignments and projects
throughout the semester. The course is assessed through a combination of coursework
and exams.
Overall, the Python Programming course at Asia Pacific University is a great option
for students looking to learn programming using Python. The course covers a wide
range of topics and provides hands-on experience with programming assignments and
projects.
Here's an example in Python to connect two laptops and share large files using
sockets:
python
import socket
python
import socket
In this example, the sender laptop opens the file to be sent and sends it over a socket
connection to the receiver laptop. The receiver laptop listens for incoming
connections and accepts the connection from the sender laptop. It then receives the
file data and writes it to a file on the receiver laptop. Note that the IP address and port
number used in the example would need to be replaced with the actual IP addresses
and port numbers of the laptops being used.