Wednesday, May 3, 2023

INPUT :

 x = 9

y = 3


print(x + y)

x = 90

y = 30


print(x - y)

x = 55

y = 56


print(x * y)

x = 10

y = 5


print(x / y)

x = 5

y = 3


print(x % y)

x = 5

y = 98


print(x ** y)

x = 5

y = 90


print(x // y)


OUTPUT :x = 9

y = 3


print(x + y)

x = 90

y = 30


print(x - y)

x = 55

y = 56


print(x * y)

x = 10

y = 5


print(x / y)

x = 5

y = 3


print(x % y)

x = 5

y = 98


print(x ** y)

x = 5

y = 90


print(x // y)




INPUT :

 a = '''Mukesh Dhirubhai Ambani (born 19 April 1957) is an 

Indian billionaire businessman. He is the chairman and 

managing director of Reliance Industries Ltd. A

Fortune Global 500 company and India's most valuable 

company by market value.According to Bloomberg Billionaires

Index, Ambani's net worth is estimated at $83.4 billion 

as of February 2023.'''

print(a.upper())



b='''Narendra Damodardas Modi is an Indian politician

serving as the 14th and current Prime Minister of India 

since 2014. Modi was the Chief Minister of Gujarat from 

2001 to 2014 and is the Member of Parliament from Varanasi'''

print(b.lower())


OUTPUT :

MUKESH DHIRUBHAI AMBANI (BORN 19 APRIL 1957) IS AN 

INDIAN BILLIONAIRE BUSINESSMAN. HE IS THE CHAIRMAN AND 

MANAGING DIRECTOR OF RELIANCE INDUSTRIES LTD. A

FORTUNE GLOBAL 500 COMPANY AND INDIA'S MOST VALUABLE 

COMPANY BY MARKET VALUE.ACCORDING TO BLOOMBERG BILLIONAIRES

INDEX, AMBANI'S NET WORTH IS ESTIMATED AT $83.4 BILLION 

AS OF FEBRUARY 2023.

narendra damodardas modi is an indian politician

serving as the 14th and current prime minister of india 

since 2014. modi was the chief minister of gujarat from 

2001 to 2014 and is the member of parliament from varanasi







INPUT : 

print("\treplace string")

a="balaji is a class topper"

b='''sanjay will always play games in mobile 

phone but he is a slow learner'''

print(a.replace("class topper","avarage student"))

print(b.replace("slow learner","class topper"))


OUTPUT :

        replace string

balaji is a avarage student

sanjay will always play games in mobile 

phone but he is a class topper




INPUT :

 print("\tRemove whitespace")

a='''     Mukesh Dhirubhai Ambani (born 19 April 1957)

is an Indian billionaire businessman, he is the 

chairman and managing director of Reliance Industries     '''

print(a.strip())


OUTPUT :

       Remove whitespace

Mukesh Dhirubhai Ambani (born 19 April 1957)

is an Indian billionaire businessman, he is the 

chairman and managing director of Reliance Industries




INPUT :

 print("\tsplit string")

a='''Mukesh Dhirubhai Ambani (born 19 April 1957) is an Indian billionaire businessman, he is the chairman and managing director of Reliance Industries'''

b = a.split(",")

print(b)


OUTPUT :

       split string

['Mukesh Dhirubhai Ambani (born 19 April 1957) is an Indian billionaire businessman', ' he is the chairman and managing director of Reliance Industries']




INPUT :

 print("\tpython string-Format string\n")

name="Sharath handran"

std="9th"

school="Srinivasa Vidhyalaya school"

fathername="Ganesh Shanker"

mothername="Kavitha"

dob="17/9/2008"

age=14

address="Udumalpet"

biodata='''My name is {},I am studying {}

standard in {} . My father's name is {},

my mother's name is {}. My date of birth 

is {} and my age is {}. I am living in {}.'''

print(biodata.format(name,std,school,fathername,mothername,dob,age,address))


OUTPUT :
     python string-Format string

My name is Sharath handran,I am studying 9th
standard in Srinivasa Vidhyalaya school . My father's name is Ganesh Shanker,
my mother's name is Kavitha. My date of birth 
is 17/9/2008 and my age is 14. I am living in Udumalpet.




INPUT :

a=('''Mukesh Dhirubhai Ambani is an Indian billionaire

businessman. He is the chairman and managing director

of reliance industries.''')

b=('''A Fortune Global 500 company and India's most valuable

company by market value.''')

c=('''According to Bloomberg Billionaires Index''')

d=a+""+b+""+c

print(d)



OUTPUT :

 Mukesh Dhirubhai Ambani is an Indian billionaire

businessman. He is the chairman and managing director

of reliance industries.A Fortune Global 500 company and India's most valuable

company by market value.According to Bloomberg Billionaires Index


INPUT :

g="sharathchandran"

print(g[:7])

f="SharathChnadran"

print(f[3:])

d="KARTHICKBALAJITHRIMOORTHIARUNACHALAM"

print(d[0:25])

c="SHARATHCHANDRANGANESHSHANKER"

print(c[8:21:2])

a="KAVITHAa"

print(a[:-1])

q="kkavitha"

print(q[-7:])

x="SANJAY"

print(x[-6:-1])

v="KARTHICKBALAJITHRIMOORTHIARUNACHALAM"

print(v[-1:-36:-2])

k="SHARATH CHANDRAN GANESH SHANKER"

print(k[:])


OUTPUT :

sharath

rathChnadran

KARTHICKBALAJITHRIMOORTHI

HNRNAEH

KAVITHA

kavitha

SANJA

MLHAUAHROIHIAAKITA

SHARATH CHANDRAN GANESH SHANKER



 

INPUT :

a='''\"Dame Agatha Mary Clarissa Christie\"(was born on 

15 September 1890 – 12 January 1976) was 

an \"English writer\" known for her \"66 detective novels and

14 short story collections\", particularly those revolving

around fictional detectives Hercule Poirot and Miss Marple.

She also wrote the world's longest-running play, the murder

mystery.The Mousetrap, which has been performed in the West

End since 1952. A writer during the \"Golden Age of Detective

Fiction\", Christie has been called the \"Queen of Crime\".

She also wrote six novels under the pseudonym Mary Westmacott.

In 1971, she was made a Dame by \"Queen Elizabeth\"  for

her contributions to literature. Guinness World Records 

lists Christie as the best-selling fiction writer of all 

time, her novels having sold more than two billion copies.'''


print(a)

 OUTPUT :

"Dame Agatha Mary Clarissa Christie"(was born on 

15 September 1890 – 12 January 1976) was 

an "English writer" known for her "66 detective novels and

14 short story collections", particularly those revolving

around fictional detectives Hercule Poirot and Miss Marple.

She also wrote the world's longest-running play, the murder

mystery.The Mousetrap, which has been performed in the West

End since 1952. A writer during the "Golden Age of Detective

Fiction", Christie has been called the "Queen of Crime".

She also wrote six novels under the pseudonym Mary Westmacott.

In 1971, she was made a Dame by "Queen Elizabeth"  for

her contributions to literature. Guinness World Records 

lists Christie as the best-selling fiction writer of all 

time, her novels having sold more than two billion copies.





Tuesday, May 2, 2023

INPUT :

print("\tBio Data user input \n")

print=str(input("Name:"))

print=str(input("Father's name:"))

print=str(input("Mother's name:"))

print=str(input("Sex:"))

print=str(input("Date of birth:"))

print=int(input("Age:"))

print=str(input("Ambition:"))

print=str(input("Address:"))

 OUTPUT :

        Bio Data user input 


Name:jiva

Father's name:jiya

Mother's name:kavitha

Sex:none

Date of birth:1/1/2000

Age:23

Ambition:youtuber

Address:1/1nn nagar udt




INPUT :

 a=''' The Nagalingam flower is known for its beautiful flowers

and has cultural and religious significance in India.

The tree is sacred to Hindus in India, who believe

its hooded flowers look like the naga. The tree is

worshipped by childless couples in some parts of India.'''


b='''Lord Shiva is the Supreme Being in Shaivism, one of the major 

traditions within Hinduism. Shiva is known as "The Destroyer"

within the Trimurti, the Hindu trinity which also includes 

Brahma and Vishnu. In the Shaivite tradition, Shiva is the

Supreme Lord who creates, protects and transforms the universe.'''


c='''The full form of Computer is "Common Operating Machine

Purposely Used for Technological and Educational Research".

The term was coined in the mid-20th century when computers

were first developed. Initially, computers were used for scientific 

and military research, but with time, their usage became widespread.'''

print(len(a))

print(len(b))

print(len(c))

OUTPUT :
269

307

311



 INPUT :

print("a<b")

a=int(input("Enter the number a="))

b=int(input("Enter the number b="))

a=(a<b)

print("\t\t\t\t",a)



print("a>b")

a=int(input("Enter the number a="))

b=int(input("Enter the number b="))

a=(a>b)

print("\t\t\t\t",a)

OUTPUT  :

a<b

Enter the number a=5

Enter the number b=4

                                 False

a>b

Enter the number a=5

Enter the number b=4

                                 True





INPUT :

 print("a<b")

a=int(input("Enter the number a="))

b=int(input("Enter the number b="))

a=(a<b)

print("\t\t\t\t",a)



print("a>b")

a=int(input("Enter the number a="))

b=int(input("Enter the number b="))

a=(a>b)

print("\t\t\t\t",a)

OUTPUT :


a<b

Enter the number a=5

Enter the number b=4

                                 False

a>b

Enter the number a=5

Enter the number b=4

                                 True



INPUT :

y=int(input("Enter the number a:"))

z=int(input("Enter the number b:"))


a=(y+z)

print("a.addition =",a)

b=(y-z)

print("b.subraction =",b)

c=(y*z)

print("c.multiplication =",c)

d=(y/z)

print("d.division =",d)


 OUTPUT :

Enter the number a:5

Enter the number b:6

a.addition = 11

b.subraction = -1

c.multiplication = 30

d.division = 0.8333333333333334




 INPUT :

a=int(input("Enter the number a:"))

b=int(input("Enter the number b:"))

if a>b:

    print("a is greater than b")

else:

    print("a is not greater than b")

OUTPUT :

Enter the number a:5

Enter the number b:6

a is not greater than b



INPUT :

print("\t\tstationary bill\n")

bag=int(input("Enter the quantity of bag:"))

a=(bag*(998+2))

print("\t\t\t\t",a)

pen=int(input("Enter the quantity of pen:"))

b=(pen*(52-2))

print("\t\t\t\t",b)

note=int(input("Enter the quantity of note:"))

c=(note*(110/2))

print("\t\t\t\t",c)

box=int(input("Enter the quantity of box:"))

e=(box*(30+20))

print("\t\t\t\t",e)

knife=int(input("Enter the quantity of knife:"))

f=(knife*(53-3))

print("\t\t\t\t",f)

t=a+b+c+e+f

print("total amount:\t\t\t",t)

g=(90/100*t)

print("Discount:\t\t\t",g)

OUTPUT :

               stationary bill


Enter the quantity of bag:5

                                 5000

Enter the quantity of pen:1

                                 50

Enter the quantity of note:5

                                 275.0

Enter the quantity of box:5

                                 250

Enter the quantity of knife:5

                                 250

total amount:                    5825.0

Discount:                        5242.5




 INPUT :

x=9

print(x > 8 and x < 7)

print(x > 10 and x < 11)

print(x > 3 and x < 12)

print(x > 13 and x < 14)

OUTPUT :
Flase

Flase

True

Flase





INPUT
:

x=5

print(x > 6 or x < 2)

print(x > 1 or x < 2)

print(x > 7 or x < 6)

print(x > 4 or x < 7)


 OUTPUT :

Flase

True

True

True


Monday, May 1, 2023

 INPUT :

x = 5


print(not(x > 2 and x < 2))

print(not(x > 7 and x < 9))

print(not(x > 9 and x < 2))

print(not(x > 3 and x < 10))

OUTPUT :
True
True
True
Flase



INPUT : 

product=[pen,pencil,box,knif,bag]

x=str(input("enter product name"))

pen=20

pencil=5

box=50

knif=40

bag=1000

for x in product:

    if 

OUTPUT :

  File "/home/main.py", line 9

    if 

       ^

SyntaxError: invalid syntax



USD TO INR C++ PROGRAMMING

  NALLAMUTHU GOUNDER MAHALINGAM COLLEGE                                                 POLLACHI-642001                                     ...