0% found this document useful (0 votes)
30 views1 page

Python Practice

This Python code defines integer, float, boolean and string data types, takes two decimal numbers as input, adds them together, converts the sum to a string and prints it out. The code takes two floating point numbers as input, adds them together, converts the sum to a string and prints it out.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views1 page

Python Practice

This Python code defines integer, float, boolean and string data types, takes two decimal numbers as input, adds them together, converts the sum to a string and prints it out. The code takes two floating point numbers as input, adds them together, converts the sum to a string and prints it out.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

int= 10 for full number

float=10.1 for decimal number

bool- converting value to bullion

str- converting value to string

first = float(input("Enter your first number: "))


second = float(input("Enter your second number: "))
sum = first + second
print("sum: ",str(sum))

You might also like