Write a python function to check whether a number is perfect

Assignment Help Python Programming
Reference no: EM131207654

Programming Assignments

1. Read Python Tutorial (https://docs.python.org/3/tutorial/index.html) sections 4.6 to 4.8.

2. Write a Python function that checks whether a passed string is palindrome or not. Note: A palindrome is word, phrase, or sequence that reads the same backward as forward, e.g., madam or nurses run.

3. Write a Python function to check whether a number is perfect or not. According to Wikipedia : In number theory, a perfect number is a positive integer that is equal to the sum of its proper positive divisors, that is, the sum of its positive divisors excluding the number itself (also known as its aliquot sum). Equivalently, a perfect number is a number that is half the sum of all of its positive divisors (including itself).

Example : The first perfect number is 6, because 1, 2, and 3 are its proper positive divisors, and 1 + 2 + 3 = 6. Equivalently, the number 6 is equal to half the sum of all its positive divisors: ( 1 + 2 + 3 + 6 ) / 2 = 6. The next perfect number is 28 = 1 + 2 + 4 + 7 + 14. This is followed by the perfect numbers 496 and 8128.

Optional - Once you've finished with the assignment, go https://www.w3resource.com/python-exercises/python-functions-exercises.phpand do as many exercises as you can. Add the solutions to the exercises that you personally solved and a brief description of the process to arrive to the solution. If you had to look into the solution before you come up with the answer, DO NOT add it to the list of exercises resolved. Submit the list of programs resolved in a word document and upload it to Moodle.

Reference no: EM131207654

Questions Cloud

What issues addressed from counseling perspective for lisa : Determine what issues were addressed from a counseling perspective for Lisa. Describe the plan you will implement to begin working more effectively with Lisa's three children while in foster care.
State primary key for each table and all other attributes : Design the necessary database tables. - State the primary key for each table as well as all other necessary attributes.
How they each influenced you to become a global citizen : After reading the article by Reysen and Katzarska-Miller, explain why there has been disagreement between theorists about the definition of global citizenship and develop your own definition of global citizenship.
Estimate the cost formula for each cost incurred by baylor : Baylor Balloon Bouquets incurred the following monthly costs.- Using the formy = mx + b, estimate the cost formula for each cost incurred by Baylor Balloon Bouquets.
Write a python function to check whether a number is perfect : Write a Python function to check whether a number is perfect or not. According to Wikipedia : In number theory, a perfect number is a positive integer that is equal to the sum of its proper positive divisors.
Apply principles of critical thinking to contemporary issues : Identify three out of five skills or competencies you have acquired through participation in general education courses that will help you strive to meet your academic and career goals.
Design and construction services for the mt crosby west bank : Your task is to write an ESSAY illustrating and explaining a methodology for the project from one case study - The mid-month progress update for the month will be in the form of a scheduled phone call, followed by an email summarising key discussion..
What is the target cost for the new game : If L"Oso desires a 60% markup on production costs, what is the target cost for the new game? -  Justin believes it will cost $24 per unit to produce the new game. What actions should he take next?
Find its clean and dirty values at the end of each quarter : A $1,000 seven-year 6% bond with semiannual coupons is redeemable for $1,065. It was originally purchased at issue for $970. It is sold after 45 months for $995. Find the accrued interest by the practical method and again by the theoretical method..

Reviews

Write a Review

Python Programming Questions & Answers

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Calculate the area of a rectangle and displays it

Write a python program that calculates the area of a rectangle and displays it - Display the variables length, width and area on screen using the print function

  Write a program that will input the name of five students

Write clearly with documentations where necessary as you write the program to solve the following problem.

  Implement functions for insertion sort

Implement functions for Insertion sort and bubble sort in python programming language and a function that calculates the function execution time.

  In this assignment you will write a program that does

in this assignment you will write a program that does simple packet routing. your program will take three command-line

  Two-dimensional word puzzle

Write a python function called find_words that finds and prints the list of valid words in a two-dimensional word puzzle

  Programming exercise - routing of telephone

programming exercise - routing of telephone callsdescriptionsome telephone operators have submitted their price lists

  Recursion to write a python function

Use recursion to write a Python function depth(LL), where LL is a nested list of lists of lists etc. of numbers (i.e., oat and int) and strings. We want to return the depth of nesting, i.e., how often, maximally, there is a list in a list etc

  Fill in the python code

Fill in the Python code to play Tic Tac Toe. I won't award points unless it runs succesfully. # Tic-Tac-Toe Game def drawBoard(board): # Draws the board using the list of numbers print(" ") print(" ",board[0]," | ",board[1]," | ", board[2]) print("--..

  How do you prevent replay attacks

What was your choice of cipher? What mode of operation does it use? Why did you make these choices? How do you prevent attackers from tampering with messages in transit? How do you prevent replay attacks

  Python programming to solve this problem

Write a statement that adds 1 to deansList and prints studentName to standard out if gpa exceeds 3.5.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

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