CP1401 Fundamentals of Problem Solving and Programming

Assignment Help Python Programming
Reference no: EM132609571

CP1401 Fundamentals of Problem Solving and Programming - James Cook University

Task:

For this assessment, you are to plan and then code 3 separate console-based programs in Python 3. This assignment is designed to help you build skills using:
1. Pizza Pay Calculator: Input, Processing and Output
2. Superhero Results: Decision structures
3. Hiking Tracker: Repetition structures
Do not define any of your own functions or use any code constructs that have not been taught in this subject. 100% of what you need to know to complete this assignment successfully is taught in the lectures and practicals.
Each program should be written in a separate Python file with the prescribed file name.
Each file should follow the structure provided below by example. That is, each file should start with a module docstring comment at the very top containing your own details and your pseudocode, then your solution code should follow. Replace the parts in <brackets>, which are there to show you where to put your details and work.

Coding Requirements and Suggestions:

• We suggest you work incrementally on these tasks: focus on completing small parts rather than trying to get everything done at once.
• Sample output from the programs are provided with each program description.
Ensure that your programs match these, including spacing, spelling, etc.
Think of this as helpful guidance as well as training you to pay attention to detail. The sample output is intended to show a full range of situations so you know how the programs should work. It should be obvious what parts of the samples are user input.
• You do not need to handle incorrect types in user input. E.g. if the user is asked for the number of minutes and enters "none" instead of an integer, your program should just crash. That's fine.
• Make use of named constants as appropriate, e.g. for things that would otherwise be "magic numbers", like pay rates or maximum distance.
• You are expected to include appropriate comments in each of your programs (not just the module docstring). Use # block comments on their own line for things that might reasonably need a comment. Do not include unnecessary or many comments as these are just "noise" and make your program harder to read.
• Check the rubric below carefully to understand how you will be assessed. There should be no surprises here - this is about following the best practices we have taught in class.

Program 1 - Pizza Pay Calculator:
Learning outcome focus: Input, Processing, Output
File name: a1_1_pizza_pay_calculator.py

Warm Pizza is a new company revolutionising the pizza home delivery experience by paying its drivers by the trip and minute.
(The faster drivers go, the more trips they can do, but the fewer minutes they get paid for. Interesting...) This program is a simple calculator for pizza delivery drivers to calculate their pay for a shift based on how many trips they do and how long they drive for.
Warm Pizza pays $1.45 per trip and $0.95 per minute.

Note: there is no looping or error-checking in this program.
The sample output below shows the currency values displayed with two decimal places. This can be achieved using string formatting, like:

print(f"Money be like ${value:.2f}")

Sample Output from 2 different runs:

Warm Pizza Pay Calculator Number of trips: 17
Number of minutes: 2
For 17 trips, your pay is: $24.65 For 2 minutes, your pay is: $1.90 Your total pay is $26.55

Warm Pizza Pay Calculator Number of trips: 7
Number of minutes: 93
For 7 trips, your pay is: $10.15 For 93 minutes, your pay is: $88.35 Your total pay is $98.50

Program 2 - Superhero Results:
Learning outcome focus: Decision Structures
File name: a1_2_superhero.py

This program helps determine the fate of trainee superheroes. Trainee superheroes enter their test scores for strength and smarts. The system then determines their results.
Trainees fail if the total of their two scores is under 50. If they pass, then they can either become:
- a super smasher, if their strength score is greater than or equal to their smarts score
- a super spy, if their smarts score is greater than their strength score If a trainee's total score is 90 or greater, they make the elite squad.

Program 3 - Hiking Tracker:
Learning outcome focus: Repetition Structures
File name: a1_3_hiking.py

This program helps hikers keep track of how far they have walked per day.
Hikers will be asked for the number of days they hiked, then the distance hiked for each of those days. When this is entered, the program will tell them the total and average distance as well as whether last day was above/below/equal to the average distance.

Number of days and each distance must be error checked (following the pattern you have been taught). There is no maximum number of days, but the minimum is 1.

Attachment:- Fundamentals of Problem Solving and Programming.rar

Reference no: EM132609571

Questions Cloud

Explain the managerial grid : You're an HR consultant at a business consultancy firm which provides training to different organization on leadership, conflict management
ICT351 ICT Professional Practice Assignment : ICT351 ICT Professional Practice Assignment Help and Solution, University of Sunshine Coast - Assessment Writing Service
Performance management scales : The organization prides itself in caring for its employees by providing them health care facilities and yearly performance-based bonuses and increments
Focus on completing small parts : Focus on completing small parts rather than trying to get everything done at once - expected to include appropriate comments in each of your programs
CP1401 Fundamentals of Problem Solving and Programming : CP1401 Fundamentals of Problem Solving and Programming Assignment Help and Solution, James Cook University - Assessment Writing Service
LD7082 Computer Networks and Security Assignment : LD7082 Computer Networks and Security Assignment Help and Solution, Northumbria University - Assessment Writing Service
What are some various strategies and techniques surrounding : What are some various strategies and techniques surrounding change management and integration, implementation
Role of strategic human resources management : Case 1-Canada, employing more than 63,000 people. When Red Lobster developed a new Red Lobster operates over 670 casual-dining seafood
Alphabet eyes new frontiers case study : Alphabet Eyes New Frontiers Case Study: Given the investments in the Moonshots, what is your assessment of the reorganization?

Reviews

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