On my assignment I am not understanding from the screenshot attached, the “invok
ID: 3600555 • Letter: O
Question
On my assignment I am not understanding from the screenshot attached, the “invoke the displayhours()” how are you attaching it to just the “displayend()” all the examples in book “starting out with python 3” are just the functions attached to the main, not attaching to an end. How do you write it attaching an additional function to another off a main function and being just with that function you attached? Does that make sense? On my assignment I am not understanding from the screenshot attached, the “invoke the displayhours()” how are you attaching it to just the “displayend()” all the examples in book “starting out with python 3” are just the functions attached to the main, not attaching to an end. How do you write it attaching an additional function to another off a main function and being just with that function you attached? Does that make sense? Changes to be made to lab3.py file The completed program must conform where the functions are invoked from, to the following hierarchy chart which provides information about The displayHours() function needs to be coded by youl Make the following changes: 1. Refer to the Programming Standards document for notes on creating the comment block 2. befine a function called displayHours). This function should display the total credit hours you are taking this semester at Waubonsee 3. Make the following changes to the functions in the script: Function name main() Changes to be made to the function n addition to the displayName function invocation, invoke the following functions, as shown in the program hierarchy chart: e displayCourses e displayEnd() displayName Display your name instead of "Maya Tolappa Display the courses you are taking at Waubonsee, instead of the ones listed in the function splayCourses() displayEndInvoke the displayHours( function as indicated in the hierarchy chart. It should be the last statement in the function Sample output Sample output from my implementation is as follows: My name is Maya Tolappa Classes for this semester: CIS118 CIS115 CIS116 CIS128 CIS130 I graduated from NTU in 1988! I took lots of hours at college!Explanation / Answer
Here the question says that your program will have a single entry point which is the main method, inside the main method there would be sequential execution or calling to the following functions as name-
displayName() ---- This prints the name "My Name is Maya Tolappa".
displayCourses() ---- This prints the courses taken in the semester.
displayEnd() ---- this function will do two things , first it will print "I graduated from NIU in 1988!" secondly it will call another function called "displayHours()" which will print "I took lots of hours at college!".
Code for function displayEnd() ---->
def displayEnd() :
print("I graduated from NIU in 1988")
def displayhours():
print("I took lots of hours at college!")
Hope this helps!
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.