Question: for the above python : # function to print yes / no # based on boolean value def myfunc 1 ( must _ print )
for the above python :
# function to print yesno
# based on boolean value
def myfuncmustprint:
if mustprint:
printYes
else:
printSorryNo
myfuncFalse
#
# myfunc
x input "please enter the stringwindysunnyrainy:
def myfuncstr:
if str "windy":
rval Please put on a jacket."
return rval
elif str "sunny":
rval "Enjoy this beautiful day."
return rval
elif str "rainy":
rval "Lets play Scrabble."
return rval
printmyfuncx
#
# myfunc
def myfunca b c:
function to perform the operation'
if c:
printThird number is even, so answer is
sum a b
return sum
else:
printThird number is Odd so answer is
prod a b
return prod
x intinputPlease enter value:
only input integer type value'
yintinputPlease enter value:
only input integer type value'
zintinputPlease enter value:
only input integer type value'
printmyfuncxyz
#
# myfun
def myfunca b:
if a b:
printvalue is greater than value
retval True
return retval
else:
printvalue is greater than value
retval False
return retval
m intinputPlease enter val:
n intinputPlease enter val:
printmyfuncmn
#
# function to print value
# of x inside and outside the function
def myownfunc:
x
printValue of x inside function:",x
x
myownfunc
printValue of x outside function:",x
# function to check
# whether x is even or odd
def OddEvenx:
if x :
printEntered number is even"
else:
printEntered number is odd"
# calling the function
pintinputEnter a number to check ODD OR EVEN:"
OddEvenp
CAN YOU HELP WITH THE APPLICATIONPY
Create another Python program named applicationpy
This program imports the myFirstFunctions,py module.
Add a main function.
Create scenarios where application 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
