Practice with defining and using python module

Assignment Help Basic Computer Science
Reference no: EM13983707

z A Python module that contains two functions

Objectives:Practice with defining and using Python module.

Design a Python module by incorporating the two functions, greatest_trivial_factor andisPalindrome,  you defined in previous lab assignments. In other words, your Python module will contain ONLY those two functions. Name your module file aslib_yourfirstname_yourlastname.py.

Next, write a simple Python program to use your above designed module. In this Python program, you should first import that module, and then write a main function that calls each of the two functions. Within the main function, prompt users to enter a number and then a string to compute the greatest nontrivial factor of the entered number and determine whether the entered string is a palindrome, and finally display the results. Don't forget to call your main function in your program.

Submission:

  • You shall submit two files: a Python module (i.e., library) file and a Python program file that uses your Python module. The names of submitted files must be in the following format, for module file and program file, respectively:                      lib_yourfirstname_yourlastname.py
  • lab9_yourfirstname_yourlastname.py

Reference no: EM13983707

Unionized environment in a health care facility

What do you see as the pros and cons of a unionized environment in a health care facility? How can the right to collective bargaining by employees and the mandate to provide

Show that a deadlock cannot occur

N processes share M resource units that can be reserved and released only one at a time. The maximum need of each process does not exceed M, and the sum of all maximum needs

Explain the concept of independence

Teen drivers. In its Traffic Safety Facts 2005, the National Highway Traffic Safety Administration reported that 6.3% of licensed drivers were between the ages of 15 and 20,

Same constant marginal cost

If firms produce identical products and have the same constant marginal cost, m, explain why the Nash-Bertrand equilibrium price and market quantity are the same regardless

Graph comparing the return on average assets

Using information found in Mergent's create a bar graph comparing the return on average assets for BB&T, Commerce Bancshares, and UMBfor the years ending 12/31/2010 and 12/31/

Future requirements for an enterprise

You have been hired to upgrade the operating systems to handle both near-term and future requirements for an enterprise that you are familiar with or a fictitious enterprise

What are the candidate keys for relation g

Is there ever a good reason to accept something less than 3NF when designing a schema for a relational database? Use this example, if necessary adding further constraints, t

Use nand logic for this design

1. Design a counter that will count 3, 9, 6, 12, 1, 14 and automatically reset to 3.2. Design a counter that will count 0, 2, 3, 7, 10, 13, 15 and automatically reset to 0.

Reviews

Write a Review

 
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd