Kilobytes to bytes in Python

Description

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

Solution

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

Explanation

get kilobytes using input() method.
Calculate byte = kilobytes * 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