A simple program that I wrote using Python as my programming language that will ask the user to give a number and then our program will convert the give number by the user into cube number equivalent.
Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com
My mobile number here in the Philippines is 09173084360.
Sample Program Output
Program Listing
def my_program():
print()
print("CUBE NUMBERS PROGRAM")
print()
number = int(input("Enter a Number : "))
print()
solve_cube = (number * number * number)
print("The cube value of ",number, " is "
,solve_cube,".")
print("\n");
repeat = input('Do you want to continue ? (Y/N) : ')
if repeat.upper() == "N":
print("\n")
print("END OF PROGRAM")
quit
if repeat.upper() == "Y":
my_program()
if __name__ == '__main__':
my_program()
No comments:
Post a Comment