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

Questions Cloud

Define the bases for competition in the market : Based on the perceptual map, define the bases for competition in the market. Are there any strategic groups - how well-positioned is Emergent with its proposed attribute levels?
Discuss theimportance of the future : Read the article by Wagner titled "Top 10 Disappearing Futures" located in the ABI/Inform database of the CSU OnlineLibrary. Choose one of the disappearing futures and write a paper at least two pages in length discussing it. Discuss theimportance of..
Histogram of y and compare it to the pdf : Generate a vector x = (x1,..., x10,000) con- sisting of 10,000 random standard Normals. Let y = (y1,..., y10,000) where yi = exi . Draw a histogram of y and compare it to the pdf you found in part (a).
What are class members : 1. What are class members and how do we use them? 2. How do we create & use Interfaces?
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_yourfi..
Describe the sample space : Describe the sample space ?. What is the probability that three tosses will be required?
Functions is performed by the loader : Which of the following functions is/ are performed by the loader? A. Allocate space in memory for the programs and resolve symbolic references between object decks B. Physically place the machine instructions and data into memory
What if such an earthquake were to hit a waste depot : Wikipedia indicates the approximate energy released by an earthquake relative to the destructive power of TNT With reasonably large quakes (> 4.0 on the Richter Scale), the energy dissipated is of the order of Giga-joules. If a seam (Uranium, Thor..
Why does current go to zero at some negative voltage : Why does current go to zero at some negative voltage and what determines that voltage? Draw on the graph to show how the curve will change if the intensity is increased.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Why are organizations important to continual learning

Why are professional organizations important to continual learning? What professional organizations benefit both the employee and the employer.

  Find the second plain text

Find the second plain text x2 - Can somebody provide the answer for given question with example?

  Discuss how you think learning more about excel will assist

Discuss how you think learning more about Excel will assist you in your school work and career. What types of spreadsheets have you created or do you plan to create now that you know more about Excel

  Explain the means of investigating trademark

Discuss and explain the means of investigating trademark and copyright infringement, sexual harassment incidents, and child pornography and laws concerning those incidents.

  Calculate the average time

How many platters and heads does this disk have? Assuming an average cylinder seek time of 11 ms, average rotational delay of 7 msec and reading rate of 100 MB/sec, calculate the average time it will take to read 400 KB from one sector.

  Describe the enterprise, in terms of its operations

Illustrate how its e-commerce or ERP implementation integrated with related ICT (information and communication technologies- data mining, business intelligences, data ware house, databases, internet, RFID, VAN, EDI) ?

  How a compiler translates into machine language

Show the code that can be generated from the production given in the diagram, and the semantic record created for the new nonterminal symbol .

  What is the difference between price maker vs price taker

How do network effects help Facebook fend off smaller social-networking rivals? Could an online retailer doing half as much business compete on an equal footing with Amazon in terms of costs? Explain.

  The company has several branch offices

The company has several branch offices. Each branch is identified by a branch_number. The name, address (street, city, ZIP), and revenue_target of each branch office are maintained. Each branch has a designated branch manager and the branch man..

  Specific role an information system

What is a specific role an information system can play in an organization? What are three components of this system? How do they work in the enterprise?

  Identify and evaluate two online stores

Identify and evaluate two online stores that sell business furniture. Briefly summarize your findings.

  Explain us supreme court-s reaction bribery of internal

Explain what was U.S. Supreme Court's reaction to case where business executive was found guilty of aiding and abetting in bribery of Internal Revenue Service Agent.

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