A table ‘customer’ has 10 columns but no row. Later, 10 new rows are inserted and 3 rows are deleted in the table. What is the degree and cardinality of the table customer.
Distinguish between data and information are as follows:
Data
Information
It is a raw fact.
It is a process form of data.
It considers facts symbols, images for reference or analysis.
It considers knowledge derived from...
customer=dict( )
n=input(” Enter total number of customers”)
i=l
while i<=n:
a=raw_input(“enter customer name”)
b=raw_input(“enter customer number”)
customer[a]=b
i=i+l
name=raw_input(” enter customer name to delete”)
del customer[name]
l=customer.keys( )
print “Customer Information”
print “Name”/\t’/’number”
for i in 1:
print i/\t’,customer[i]
Output :
Enter total number of...
def printlist(s):
i=0
for i in range(len(s)):
print i,s[i]
i = 0
phonenumbers = [‘9840012345’,‘9840011111’,’
9845622222’,‘9850012345’,‘9884412345’]
flag=0
number = raw_input(“Enter the phone number to be searched")
number = number.strip()
try:
i = phonenumbers.index(number)
if i >= 0:
flag=1
except ValueError:
pass
if(flag <>0):
print “\nphone number found...