Answered step by step
Verified Expert Solution
Link Copied!

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
image text in transcribed
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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 2 Lnai 9285

Authors: Annalisa Appice ,Pedro Pereira Rodrigues ,Vitor Santos Costa ,Joao Gama ,Alipio Jorge ,Carlos Soares

1st Edition

3319235249, 978-3319235240

More Books

Students also viewed these Databases questions

Question

demonstrate the importance of induction training.

Answered: 1 week ago