Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Python Expert

Python Programs

You must submit the source code and samples of output for each program.Please do not provide python file (eg. Filename.py). Copy all source code to one word file.

1) Write a program that simulates the Math method 'sqrt'. The program will read real Values as input and calculate the value as square root of the input value (Use math library). This will then output to screen as following two examples:

Input of 2, should return 1.

Input of 4, should return 2.  

2) Write a python code comparing while andfor loops (ie. Times tableeg. 2x1=2, 2x2=4,...).

3) Write a program to input a year and determine whether or not it is a leap year. A year is a leap year if it is divisible by 4 but not by 100 unless it is also divisible by 400.

4) Write a programme that calculates: How much an amount deposited in a bank account at r% annual interest has grown to after one, two and three years. The general formula for computing the amount including after n years is: Kn= k0 *(1+r/100)n

5) Write a program that reads a line of text from the keyboard, and prints it back after replacing each occurrence of any four-letter word in the text with the word "x***", where x is the first character in the four-letter word.

Example: Input the string "This apple tree is the best"

                 Is replace to "T*** apple t*** is the b***"

6) Write a program that reads a sequence of integers from a fileand prints a frequency report showing how many times the integers 0, l, ..., 9 occur in the sequence.

7) Write a program that uses paired array. The first list (array) represents all the student grades (F2, F1, P1, P2, C, D, HD), while the second list (array) holds the corresponding cutoff percentagemark required (0, 45, 50, 60, 70, 80, 90). The program should prompt and read a percentage value as input. The task is to match the grade with the cutoff percentage mark. The grade is output to the screen.

8) Write a program that reads a list of twenty integers from a file and stores them in an array. The program should print the position of the smallest number in the array. If the position of the smallest number is other than 0, the program should swap the number in position 0 with the smallest value. After swapping, the smallest number is now in position 0 and the number that was previously in position 0 is now where the smallest number was. Finally the program should print the values in the array.

9) Write a class Player that stores the name,type of sport, position and score. Include the Constructor, Accessor and Mutator methods.

10) Include in the question 8 the four methods, the methods to reset score, increase and decrease the score and to print the current score.

Python, Programming

  • Category:- Python
  • Reference No.:- M9525564

Have any Question?


Related Questions in Python

Question write a simple python program that takes use

Question: Write a simple python program that takes use inputs as non-zero digits and converts them into binary form. The response must be typed, single spaced, must be in times new roman font (size 12) and must follow th ...

Sieve of eratosthenes in pythonthe goal is to find all the

Sieve of Eratosthenes (in Python) The goal is to find all the prime numbers less than or equal to some natural number maxn. We have a list that tells us if any of the numbers 0..maxn are "marked". It can be an array of b ...

In this programming assignment you will write a client

In this programming assignment, you will write a client pingprogram in Python. Your client will send a simple ping message to a server, receive a correspondingpong message back from the server, and determine the delay be ...

Question a software company sells a package that retails

Question : A software company sells a package that retails for $99. Quantity discounts are given according to the following table: Quantity Discount 10 - 19 20% 20 - 49 30% 50 - 99 40% 100 or more 50% Write a program usi ...

Project reconnaissance and attack on ics

Project: Reconnaissance and Attack on ICS NetworksEnvironment Setup The second mini project will be based on Industrial Network Protocols, specifically the Modbus protocol. Please follow the instructions carefully to set ...

Lab assignment -background - we have discussed in detail

Lab Assignment - Background - We have discussed, in detail, the function of Stacks and Queues and how they are specifically implemented in Python. To get a better understanding of the utility of these data structures, we ...

Show times in tmus and seconds1 an associate grasps an oven

Show times in TMUs and seconds. 1. An associate grasps an oven door within reach and pulls it open 18 inches with the left hand (he does not relinquish control of the door). With a pan in the right hand, he carefully pos ...

Tasksdemonstrate data scraping of a social network of

Tasks Demonstrate data scraping of a social network of choice. Develop technical documentation, including the development of the code & detailing the results. Provide a report on the findings, that includes research into ...

Part i the assignment filesone of the most important

Part I: The Assignment Files One of the most important outcomes of this assignment is that you understand the importance of testing. This assignment will follow an iterative development cycle. That means you will write a ...

Architecture and system integrationcase study queensland

Architecture and System Integration Case Study: Queensland Health - eHealth Investment Strategy After evaluating various platforms, Queensland Health finally decided to adopt a Service Oriented Architecture (SOA) for its ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As