Question:

Write a Program to take fraction Number as input from console and connect the given fraction to a floating point number and then extract the integer part and the fractional part of that floating point number. 

Example input:

22.34

Example Output:

Interger 22, Float 34 

Source Code

				
					N = input() 
s=N.split('.')
print(f'Integer: {s[0]}, Float: {s[1]}')
				
			

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published.