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

  Develop an action plan identifying key tasksand

Develop an action plan identifying key tasksand / or processes involved in changing from Windows 7 to Windows 10 and how they will change

  What do you do when an application freezes

What do you do when your computer freezes and what do you do when an application freezes?

  Design a program that will allow a user to input a list

Design a program that will allow a user to Input a list of your family members along with their age and state where they reside. Determine and print the average age of your family and print the names of anyone who lives in Texas

  Compute the total asset value

For this project assume that an organization has five total servers. One server has a TCO of $25,000, two servers have a TCO of $37,000 and the remaining two servers have a TCO of $42,000. The servers are not used by internal employees but are ..

  Guidelines regarding the initial comment section

Observe the usual guidelines regarding the initial comment section, indenting, and so on.  In addition,

  Elastic and inelastic

Elastic and Inelastic

  Determining contents of memory of specified address

Find the contents of memory from address 0x1800 up to, but not including, 0x1809, after this code is executed.

  What do you recommend he do about making a backup

What do you recommend he do about making a backup - The chief financial officer (CFO) of NCWR keeps a huge number of reports, spreadsheets, and other critical financial information on his computer

  The model using one of the three approaches

Question ADescribe the model of "respect to persons" to common morality, explain its purpose in society, and then provide examples (from either your work experiences or from Internet search) of implementing the model using one of the three approaches..

  Differences between scholarly resources and popular resource

Detail how you will be most effective and efficient in finding resources that fit your research needs.

  Hd-dvd versus blu-ray

In recent times, HD-DVD and Blu-ray were competing technology formats for creating and watching movies on DVDs. Neither was compatible with the other. Eventually, Blu-ray won the competition.

  Write a screen saver program that generates random shapes

Write a Screen Saver program that generates random shapes of random colors and sizes at random positions within the display area. Add controls so typing different keys on the keyboard cause the window to change size and background color as describ..

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