Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please show me step by step in python Task 3 - Create a global variable called num_executions, set to 0 - Every time c_to_f or
please show me step by step in python
Task 3 - Create a global variable called num_executions, set to 0 - Every time c_to_f or emphasise is executed, num_executions should be increased by 1 - After each function has been run, print out the value of num executions Task 4 - Create a function called main. This function takes no arguments, and doesn't return anything. Move all executions of c_to f and emphasise, and the print statement from Task 3 , into the main function. Don't move the function definitions!! - Add an if block which checks if your file is being run as the main module, or whether it is being imported. If it is the main module, print a message like "This is the main module", and then run the main function. Otherwise, print a message like "This module has been imported" (see the Two ways to call a main0 function section of this week's lecture notes) - Create a second Python file. This file should not be submitted, you will just use it for testing - Inside the second file, import the first file, as though it were a module (see the Ways to Import Module section of this week's lecture notes). Ensure that "This module has been imported" is printed, as per the second step of this task Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started