Bytes to kilobytes in Python

Description

Python program to get bytes b from user and  find kilobytes kb
Sample Input 1:
2048
Sample Output 1:
2
Input 2:
1024
Output2:
1

Solution

b=int(input("Enter Bytes:"))
kb=b/1024
print("{} Kilo Bytes".format(kb))

Explanation

get bytes using input() method.
Calculate kilobyte = byte/1024  (1 kilo byte = 1024 bytes)



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