Question: Here is my program named myFirstFunctions.py: def myfunc 1 ( is _ true ) : if is _ true: print ( Yes )

Here is my program named myFirstFunctions.py:
def myfunc1(is_true):
if is_true:
print("Yes")
else:
print("Sorry, No")
def myfunc2(weather):
if weather == "windy":
return ("Please put on a jacket.")
if weather == "sunny":
return ("Enjoy this beautiful day.")
if weather == "rainy":
return ("Let's play Scrabble.")
def myfunc3(a, b, c):
if c %2==0:
return (a + b)
else:
return (a * b)
def myfunc4(arg1, arg2):
return (arg1> arg2)
def square(number):
return (number **2)
if __name__=="__main__":
myfunc1(False)
weather = myfunc2("rainy")
print(weather)
result = myfunc3(5,7,9)
print(result)
greater = myfunc4(6,3)
print(greater)
number = square (9)
print(f"The square of 9 is: {number}")
How do I perform the second part of my assignment:
- Create another Python program named application1.py
- This program imports the myFirstFunctions,py module.
- Add a main function.
- Create scenarios where application1 uses several functions in myFirstFunctions and completes simple tasks.
- Place these calls in the main function.
- Incorporate the use of the __name__ variable in both programs.
- Apply a good programming style.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!