Wednesday, July 17, 2019

Double a number

Script

#!/usr/local/bin/python3.7


def double(n):

    return (2 * n)


n = int(input("Enter the number that you want to get doubled: "))

x = double(n)

print(x)


Execution

Enter the number that you want to get doubled: 34

68



Enter the number that you want to get doubled: 71

142















No comments:

Post a Comment