How complex programming problems are solved in real-life

Assignment Help Python Programming
Reference no: EM132310957

Purpose of the assessment - Assess student's ability to analyse programming problems and design and implement solutions as part of a developer team.

Assignment Specifications

This assignment evaluates your understanding of basic programming principles using Python programming language. In particular, this assignment assesses your ability to develop algorithms to solve simple problems, successfully develop and run python programs, and your ability to write meaningful comments when required. The assignment also provides a platform for students to work together in groups to develop solutions, which resembles how complex programming problems are solved in real-life.

Assignment Structure should be as the following:

1. Write a program named unique.py. The program takes as an input a text file. Your program should print all the unique words in the file in alphabetical order.

2. Write a program named frequency.py. The program takes as an input a text file. Your program should print all the unique words in the file and their frequencies in alphabetical order.

3. Define a function conversion.py which takes a decimal number as an input, and returns its representation in a given base as a string (i.e. binary, octal, or hexadecimal string). The function uses a look-up table (dictionary) to map decimal integers to digits in the targeted base. For your convenience, the look-up table is provided below. A main function with test statements are also provided. Hint: figure out how base 10 can be converted to other bases, then write the algorithm.

lookUp = {0 : '0', 1 : '1', 2 : '2', 3 : '3', 4 :'4', 5 : '5', 6 : '6', 7 : '7', 8 : '8', 9 : '9', 10 : 'A', 11 : 'B', 12 : 'C', 13 : 'D', 14 : 'E', 15 : 'F'}

def main():
"""Tests the function.""" print(decimalToRep(10, 10))
print(decimalToRep(10, 8))
print(decimalToRep(10, 2))
print(decimalToRep(10, 16))

# The entry point for program execution if name == " main ":
main()

4. A list is said to be sorted ascendingly if it is either empty or if each item (except the last one) is less than or equal to the item prior to it. Define a function sorted.py which takes a list as an input and returns True if the list is sorted and False otherwise.

5. Define a function myRange.py, which behaves like the standard range function in python and takes both required and optional arguments. Do not use the standard Python's range function in your solution. You need to develop your own range function. Read Python's help on the standard range function to understand its arguments. Assign None as a default value for the two optional arguments. If the two optional arguments equal None, that means the range function has been called with just the stop value. If only the third argument equals None, this means the function has been called with both, the start and stop values. Therefore, the first part of your code determines what the parameters are while the rest of the code uses these parameters to build-up a list by counting up or down.

Attachment:- Introduction to Programming.rar

Reference no: EM132310957

Questions Cloud

Ethical and professional responsibility : develop your own business idea, complemented by research and observational insights that detail why the need is compelling
What was your overall reaction to the film : What was your overall reaction to the film? What is the prevalence of "underbanked" or "unbanked" people in the US? What are the implications of these types
Functional analysis and allocation : Functional Analysis and Allocation is a key process in systems engineering design. In this group assignment you are to you are required to write a ~2000
Estimate the average availability over the time horizon : Provide the estimates of the time dependent reliability R(t) of the system; and the average availability over the time horizon
How complex programming problems are solved in real-life : HS1031 - Introduction to Programming - Holmes Institute - Analyse programming problems and design and implement solutions as part of a developer team
What are implications of these high risk rates for suicide : What are implications of these high risk rates for suicide, for social work? describe some of risk factors for suicide in gay, lesbian, and/or bisexual youth.
Reflect on the entire business consultancy experience : BIZ304 Business Consulting Report-Laureate International Universities-US-Develop high levels of Client orientation and professionalism.
Devise and monitor an action plan : GRM4007 Personal Development Planning Assignment - Reflective Summary, Gulf College, Oman. Devise and monitor an action plan
Define and apply key concepts of innovation : Define and apply key concepts of innovation in commercial, digital, service, and social contexts - Investigate cases of disruptive innovation in different

Reviews

len2310957

5/23/2019 10:43:56 PM

Marking criteria Weighting Appropriate commenting 5% Sound logic 5% Code running successfully 5% TOTAL Weight 15% Assessment Feedback:

len2310957

5/23/2019 10:43:48 PM

• You are allowed to use built-in library functions or methods if required. • Make sure that your code runs successfully for all possible entries. • Try to approach the solution with the least number of steps. Your code must be clear, logical, and easy to understand. • All work must be submitted to Blackboard by the due date • You are encouraged to avoid last minute submission so that you do not run into technical problems. • You can only submit once. Thus, ensure that your work is final prior to submission. • This is a group project. Please make sure to divide tasks equally among the group. Group members need to collaborate to make sure that all programs run successfully and are appropriately commented.

len2310957

5/23/2019 10:43:43 PM

• There are five questions in this assignment which require you to write and submit five Python scripts. Similar to what you did in assignment I, please save each script in two different formats: .py and .txt prior to submission. For example, for the first question you need to submit unique.py and unique.txt. • Code must be appropriately commented. Make sure to add comments at each segment of your code to explain what it does.

Write a Review

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  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.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  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.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

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