Skip to content

Commit

Permalink
basic.md
Browse files Browse the repository at this point in the history
awesome
  • Loading branch information
kishankumar09 authored Oct 16, 2020
1 parent 8682a38 commit b788c5c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions basic example
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Example: Kilometers to Miles

# Taking kilometers input from the user
kilometers = float(input("Enter value in kilometers: "))

# conversion factor
conv_fac = 0.621371

# calculate miles
miles = kilometers * conv_fac
print('%0.2f kilometers is equal to %0.2f miles' %(kilometers,miles))

0 comments on commit b788c5c

Please sign in to comment.