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

  Technology in home-workplace has negative impact on women

What technology in the home and workplace has a negative impact on women, if any; and (b) do women roles still remain largely associated with the home and domestic chores.

  Coordinate the other source files, main calls functions

Copy the directory lab5 from the cis18b directory. This is the directory where you will do your work for Module 5 lab. In this directory are some source files that work together to allow the user to multiply 2 integers (yes, the code is a no-brain..

  Write instructions to move value of register and add them

Write instructions to move value 34H into register A and value 3FH into register B, then add them together. Where is the result

  The officer who tagged and bagged evidence

"You receive a computer system from the officer who tagged and bagged evidence at a crime scene in suspects home. you examine the compuer and discover that it uses a SCSI drive on a windows system .

  Describe wal-mart''s stance corporate social responsibility

Describe the Wal-Mart's stance on corporate social responsibility (CSR). 2. Discuss the connection between the CSR program and why it is necessary to the specific industry

  Simplify the functional expressions using boolean algebra

The Apostrophes represent a line over the letter that it is after. The last set of parenthesis has a line over it as well as the x and y in them.

  Design a program to produce a sales report

Design a program that will read a file of sales records and produce a sales report. Each record in the file contains a customer's ID, name, a sales amount, and a validated GST code.

  Explaining vulnerability in novice programmer-s code

You have found vulnerability in novice programmer's code and have recommended sweeping changes in your organization to address issues.

  Benefits-negative effects brought by workplace automation

Write down at least three benefits and three negative effects brought about by workplace automation.

  Which five google technologies

1. Which five Google technologies would you like to research for your Final Case Studies?

  What is projectitis

What is projectitis? How is it cured or its impact minimized?

  Define the method called getstringinput( ) using the method

Define the method called getStringInput( ) using the method header

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