Python: Functions

Post Reply
User avatar
Jason
Site Admin
Posts: 767
Joined: Sun Dec 21, 2025 8:56 pm

Code: Select all

def add_number_to_1():

		the_added_number_to_1 = float(input("What number do you want to add to 1?:"))

		return 1 + the_added_number

result = add_number_to_1()

print(f"Your chosen number added to 1 is {result}.")

 

POSTREACT(ions) SUMMARY

Post Reply