I am writing a Python program to serve as a fitness tracker. I would love some input as to how you would code this. I've included what I want this program to accomplish, what I will keep track of, and below all of that I have posted the assignment guidelines. Any suggestions on how to make this better/ more efficient would be welcome! I'm thinking of making a weekly tracker that takes input per day, and outputs at the end of the week the amount of exercise and if goals were met. Could be a monthly accumulation, but weekly would be easier.
Fitness Tracker: To determine if fitness goals were met.
Set goal (minimum): 4 yoga classes per week. Per day: 20 min of exercise (cardio, weights, body weight resistance), 10 min of meditation/stretching
Input daily, but you can input it all at the end of the week if you want.
Maybe I should prompt the user to enter the date and keep track in a range of 7 days and start there.
Output: Weekly amount: Amount of exercise (yoga classes taken, Min of exercise per type, min of stretch/meditation). Determine if goals were met. Ouput time should be in hours.
Below are the assignment requirements. A test plan is also required.
The test plan document Lab4-TestPlan should meet all of the following requirements:
Here is a small program, I just thought about it with your inputs. Hope it helps you. Here is the code and screenshot of the actual run
------------------------------------------------------------------------------------------------------------------------------------------
def get_user_time(type): did_ = input('Did you do ' + type + '? (yes/no): ') if did_.lower() == 'no': return 0 else: time = float(input('Enter how long you did ' + type + '? (mins): ')) return time def main(): duration=[0,0,0] types=['yoga','cardio','meditation'] days=['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'] print('Welcome to Fitness Tracker') for day in range(1,8,1): print('Day -', days[day-1]) for type in types: time=get_user_time(type) if type=='yoga': duration[0]+=time elif type=='cardio': duration[1]+=time else: duration[2]+=time if sum(duration)>=3*20*7: print('Your fitness score is 5 on scale of 5.0') elif sum(duration)>=3*20*7*0.8: print('Your fitness score is 4 on scale of 5.0') elif sum(duration)>=3*20*7*0.6: print('Your fitness score is 3 on scale of 5.0') elif sum(duration)>=3*20*7*0.4: print('Your fitness score is 2 on scale of 5.0') else : print('Your fitness score is 1 on scale of 5.0') main()
------------------------------------------------------------------------------------------------------------------------------------------
I am writing a Python program to serve as a fitness tracker. I would love some...
Lab 5 Instructions For Lab 5, you will be writing a more complex modular program that uses at least two arrays, and has at least one loop that accesses the data in the arrays. As long as your program satisfies the requirements listed below, you are free to design and write any type of program that you care to. You are encouraged to be creative, and pick something that has meaning for you, because you'll have more fun. Feel free...
[PYTHON] Create a chatbot program in Python: a program that appears to talk intelligently to a human using text. Your program should involve asking the user questions and having the computer respond in a reasonably intelligent fashion based on those answers. For example, here is a sample chat: ChatBot: Welcome, I am Chatbot . What is your name? User: My name is Abby . ChatBot: Hello Abby. How old are you? User: 22. <---- Input ChatBot: That is older than...
I have this code and need this to be written and applied with an array? How do I process this? Also What would I apply this with flowchart? Module main() Call getDailyProfit() Call calculateWeeklyProfit() Call main() Module getDailyProfit() // Declare all variables and establish the array Constant Real SIZE = 7 Declare String days[SIZE] = Sunday, Monday, Tuesday, Thursday. Friday, Saturday Declare Real days Declare Real number Declare Real Index //Prompt the user for profit information for Sunday Display “How...
Hello, I am wondering what the source code for this problem would be. Thank you so much. You will write a java program using the Eclipse IDE. The program will allow a user to perform one of two options. The user can look up the dates for a given zodiac sign or enter a date and find what sign corresponds to that date. SIGN START DATE END DATE Aries 3/21 4/19 Taurus 4/20 5/20 Gemini 5/21 6/20 Cancer 6/21 7/22...
This is a c++ question note: not using namespace std; at the beginning of the program Writing Data to a File This program will write a series of letters, starting with 'A', to an external file (letters.txt). The user will decide how many letters in total get saved to the file. ** IMPORTANT: The test cases will evaluate your code against .txt files that I uploaded. You do NOT have to upload your own txt files. Input: Including 'A', how many...
(I would like this to be in five parts.) Write a program (Python module) that includes a function named studentrecords. This function must support execution of two loops. The first loop is to query the user whether they wish to enter additional records or not. It must accept responses of either yes or no as input, regardless of the letter-cases used for individual letters in the response. If the response is not recognized ( it isn’t yes or no) it...
I need help in Python. This is a two step problem So I have the code down, but I am missing some requirements that I am stuck on. Also, I need help verifying the problem is correct.:) 7. Random Number File Writer Write a program that writes a series of random numbers to a file. Each random number should be in the range of 1 through 500. The application should let the user specify how many random numbers the file...
You are to write a basic fitness application, in C++, that allows the user of the application to manually edit “diet” and “exercise” plans. For this application you will need to create three classes: DietPlan, ExercisePlan, and FitnessAppWrapper. Diet Plan Attributes: The class DietPlan is used to represent a daily diet plan. Your class must include three data members to represent your goal calories (an integer), plan name (a std::string), and date for which the plan is intended (a std::string)....
. Discussion will include aerobic, strength and flexibility components. If you already have a regular exercise program, you will evaluate and critique each area of your program, commenting on the strengths and weaknesses of that program as it relates to the principles of F.I.T.T. Why did you choose this program and how is it helping you to reach your goals? What progress/success have you had with the program? What challenges do you face in continuing this program? Do you need...
In Python Exercise – For & While Loops Create a new file called loops.py and use it for all parts of this exercise. Remember the difference between input and raw input? Be sure to test your code for each part before moving on to the next part. Write a program using a for loop that calculates exponentials. Your program should ask the user for a base base and an exponent exp, and calculate baseexp. Write a program using a while...