0% found this document useful (0 votes)
110 views

Assignment On Logic and Design: Group Members: Abenezer Girma Fenet Mulugeta Submitted To: Atnafu Jembere

The document discusses the use of import statements in Python to access code from other modules. It provides examples of using import, from...import, and from...import * to import specific functions or all functions from a module. It also discusses how to work with dates in Python using the datetime module, and provides examples of creating date objects and formatting dates. Functions in Python are introduced, including how to define and call functions and use the return statement. The advantages of using information and communication technology in banks and media are improved customer service, efficient transactions, and easy access to information.

Uploaded by

Abenezer Girma
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
110 views

Assignment On Logic and Design: Group Members: Abenezer Girma Fenet Mulugeta Submitted To: Atnafu Jembere

The document discusses the use of import statements in Python to access code from other modules. It provides examples of using import, from...import, and from...import * to import specific functions or all functions from a module. It also discusses how to work with dates in Python using the datetime module, and provides examples of creating date objects and formatting dates. Functions in Python are introduced, including how to define and call functions and use the return statement. The advantages of using information and communication technology in banks and media are improved customer service, efficient transactions, and easy access to information.

Uploaded by

Abenezer Girma
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 21

ASSIGNMENT ON LOGIC AND

DESIGN

Group members: Abenezer Girma


Fenet Mulugeta
Submitted to: Atnafu Jembere
Import module in Python

 Import in python is similar to #include header_file in C/C++.


Python modules can get access to code from another module by
importing the file/function using import. The import statement
is the most common way of invoking the import machinery, but
it is not the only way.
 import module_name
When import is used, it searches for the module initially in the
local scope by calling __import__() function. The value
returned by the function are then reflected in the output of the
initial code.
Example
 import math
print(math.pi)
 Output : 3.141592653589793
import module_name.member_name
 In the above code module math is imported, and its variables can be accessed
by considering it to be a class and pi as its object.
The value of pi is returned by __import__().
pi as whole can be imported into our intial code, rather than importing the
whole module.
 from math import pi

# Note that in the above example,


# we used math.pi. Here we have used
# pi directly.
 print(pi)
from module_name import *

In the above code module math is not imported, rather just pi


has been imported as a variable.
All the functions and constants can be imported using *.

from math import *


print(pi)
print(factorial(6))
Python Dates

 A date in Python is not a data type of its own, but we can import
a module named datetime to work with dates as date objects.
 Example
 Import the datetime module and display the current date:
 import datetime

x = datetime.datetime.now()
print(x)
Creating Date Objects

 To create a date, we can use the datetime() class (constructor) of the datetime module.

 The datetime() class requires three parameters to create a date: year, month, day.

Example

 Create a date object:


import datetime
x = datetime.datetime(2020, 5, 17)
print(x)
A reference of all the legal format codes:
Python abs(x) function:
 Python abs(x) function:
 The function returns the absolute value of a number. The
argument may be an integer or a floating point number. If the
argument is a complex number, its magnitude is returned.
What is a function in Python?
 In Python, function is a group of related statements that perform
a specific task.
 Functions help break our program into smaller and modular
chunks. As our program grows larger and larger, functions make
it more organized and manageable.
 Furthermore, it avoids repetition and makes code reusable.
Syntax of Function
def function_name(parameters):
"""docstring"""
statement(s)
Example of a function
def greet(name):
"""This function greets to the person passed in as
parameter""" print("Hello, " + name + ". Good morning!")
How to call a function in python?
 Once we have defined a function, we can call it from another
function, program or even the Python prompt. To call a function
we simply type the function name with appropriate parameters.

 >>> greet('Paul')
 Hello, Paul. Good morning!
The return statement
 The return statement is used to exit a function and go back to
the place from where it was called.

Syntax of return
 return [expression_list]
 This statement can contain expression which gets evaluated and

the value is returned. If there is no expression in the statement


or the return statement itself is not present inside a function,
then the function will return the None object.
Example
 def absolute_value(num):
"""This function returns the absolute value of the entered number"""
if num >= 0:
return num
else:
return –num
# Output: 2
print(absolute_value(2))
# Output: 4
print(absolute_value(-4))
The Use Of ICT In Banks
 Provides self service facilities such as ATMs and Mobile
banking
 For transaction processing and recording
 Introduced the use of Electronic banking and Internet banking
 Helps administrative managers make good decisions.
Equipment Used in Banks
 ATMs
 Simply mobile phones(for mobile banking)
 Computers
 Servers
Advantage Of Using ICT In Banks
 ICT led to an improvement in customer service, facilitated
accurate record-keeping.
 Enhanced the speed of overall services, ultimately leading to
more efficient and competitive market.
The Concept of Banking first started by merchants from around the world, who gave
loans to farmers and traders who carried good traveling from a city to another.

Currently banking has been very improved by the use of ICT and it is giving a great
service for customers and in the future where the digital age is changing how people
interact and business on a day to day basis the use of banking, specifically, mobile
banking will be more efficient

Finally, we can conclude that the use of ICT in banking has made it more efficient
The Use ICT In Medias
 Enables users to create, access, store, manage and communicate
information in digital format
 Provides a wide range of leisure opportunities
Advantage Of Using ICT In Media
 For transferring information easily and fast
 Storing important things (both with small or big in size)
securely.
 It enables users to easily access and manage their data.

Internet and social media are now the most used sources of
information and are highly growing sectors showing its future
would be a good one .
THANK YOU

You might also like