Meters to Kilo Meters in Python

Description

Python program to get meter m from user and find kilometer km
Sample Input 1:
56000
Sample Output 1:
56

Solution

m=int(input("Enter Meters:"))
km=m/1000
print("{} kilometers".format(km))

Explanation

get meter using input() method
multiply it by 1000 (1kilometer = 1000 meters)



Interesting Pattern Programs: for more Patterns

Input:
5
Output:
*
**
***
****
*****
****
***
**
*Solution
Input:
5
Output:
    *
   ***
  *****
 *******
*********
 *******
  *****
   ***
    *Solution
Input:
5
Output:
*        *
**      **
***    ***
****  ****
**********Solution
Input:
5
Output:
*       *
**     **
***   ***
**** ****
*********Solution
Input:
5
Output:
*       *
**     **
***   ***
**** ****
*********
**** ****
***   ***
**     **
*       *Solution
Input:
5
Output:
*********
 *******
  *****
   ***
    *
   ***
  *****
 *******
*********Solution