0% found this document useful (0 votes)
7 views3 pages

Project Guide for Programming Basics

This project guide provides step-by-step instructions for creating a simple program that welcomes users, prompts for service selection, and executes BMI calculations or currency exchange. It emphasizes the importance of user input, decision-making with if/else statements, and maintaining clean, organized code through functions. The guide also includes submission instructions for the completed project on the platform.

Uploaded by

stemdigest23
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views3 pages

Project Guide for Programming Basics

This project guide provides step-by-step instructions for creating a simple program that welcomes users, prompts for service selection, and executes BMI calculations or currency exchange. It emphasizes the importance of user input, decision-making with if/else statements, and maintaining clean, organized code through functions. The guide also includes submission instructions for the completed project on the platform.

Uploaded by

stemdigest23
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Project Guide

This guide will give you hints for every step of completing the
project, these will help you scratch the surface so you can
dive straight into crafting your project. If you need additional
help, check out my own solution to writing this program

Programming 101: A Programming Journey for Absolute Beginners -


[Link]
Prepared by Basil Habash - [Link]
Habash/524360941?gr_tch_ref=on&gr_trp=on
Step 1:
Welcome the user to the program and introduce the services it
offers.

This is a very basic step that demands the use of one of the most core concepts of
programming, displaying text. Try using the print function to display a string. This
string should be very simple, along the lines of:
Hello! Welcome to this program...
Then try printing a string that explains in your own way what the program does.

Step 2:
Prompt the user to choose one of the services.

This step requires obtaining data from the user, which is done using input(). Prompt
the user to enter which service they wish to use. There are many ways to do this, you
can ask the user for the name of the service, the number you labelled it with, etc...

Step 3:
Execute the code for the service they chose,
a. If the user decides to find their BMI, have them enter their mass
in kg and height in meters, then calculate their BMI using the
formula BMI=mass divided by the height squared (BMI=kg/m^2).
b. If the user chooses to exchange currencies, ask them to enter an
amount of money in a particular currency of your choice, and
convert it to the equivalent amount in your country's currency.

This step requires a decision to be made, so an if/else statement should be used to


determine which code should be executed: The one for calculating the BMI of the
user, or the one for currency exchange. The code for each of these 2 services is very
simple and requires input, printing strings and simple mathematical calculation.
Remember that you cannot use strings in mathematical calculations, so be sure to
set the input values to floats.(Since they could all take decimal values e.g.
height=1.78m, mass=76.5kg, amount=12.99$)
You can get the formulae for calculations from your search engine.
Please note that currency exchange rates differ from time to time, therefore the one
I used in the sample may not be accurate.
Step 4:
Finally, ask the user if they wish to use the program again, then
either repeat the code or terminate the program, depending on
their choice.

For this step you first have to ask the user if they want to use the program again
using input(), and storing their answer inside a variable. Then create a while loop
using that variable, so that you loop through the code you've written in steps 1,2 and
3, each time asking the user if they want to use the program again, and storing their
answer inside the variable.

Step 5:
Making your code visually simple and organized is essential for
programmers, so be sure to check that off your list!

Consider creating functions for each of the services in (a) and (b), and then calling
these functions when you need to execute them. This should make your code simple
to read. Also consider adding empty spaces along the program using print(""), so it is
visually more presentable to the user

Submitting your Project:


Submitting your class project should be a breeze. Just take a
screenshot(s) of your program file and a screenshot(s) of the result
in the shell, then upload them to the project gallery to get feedback

Here's how to submit your class project:


Head to the "Projects & Resources" tab within the class. From here, click Create
Project, follow the prompts relevant for your project, and then click Publish once
finalized.

Common questions

Powered by AI

User prompts gather input, allowing users to dictate the program's flow based on their choices, directly increasing interactivity. On the other hand, print statements serve a dual role: they convey information, guiding users through the program, and improve comprehension by organizing output visually. Together, these tools enable a dynamic interaction while ensuring users clearly understand the program's processes and results .

The guide recommends improving code readability by creating functions for each service, which can be called when needed. This modular approach makes the code simpler and easier to understand. Additionally, it suggests using print statements to insert empty spaces in the display, making the program more visually organized and engaging for users. These practices contribute to a cleaner codebase and a more pleasant user interface .

The guide suggests structuring user interaction through a series of steps: welcoming the user, prompting them to choose a service, executing the chosen service, and then asking if they wish to repeat the process. This structure is beneficial because it creates a clear flow of interaction, guiding the user through a logical sequence of operations. This method of structuring helps to manage user expectations and ensures that the program is user-friendly and easy to navigate .

The guide utilizes decision-based functionality through the use of if/else statements to execute different services based on user choices. This approach allows the program to respond dynamically to user input, providing either BMI calculation or currency exchange. Additionally, looping through operations using a while loop allows users to continuously interact with the program until they decide to stop. These concepts contribute by making the program interactive and modular, allowing it to handle different user requests seamlessly .

The guide recommends using floats for user input to accommodate decimal values, such as height or currency amounts, which are common in real-world data. By using floats, the program can perform more accurate calculations and express results with precision. This increases the program's accuracy and provides a better user experience as it allows for a more realistic representation of input data, preventing errors that could arise from integer operations where precision is necessary .

The guide emphasizes visual simplicity and organization to make the code more readable and maintainable. Clear organization aids in understanding the program structure and logic at a glance, facilitating easier debugging, updating, or expanding the program in the future. This reduces the cognitive load on developers and aids in maintaining code quality over time .

The guide instructs to submit the project by capturing screenshots of the program and its results, then uploading them for feedback. This approach aligns with best practices by facilitating effective documentation and maintaining a record of functionality. It also opens channels for user feedback, critical for continuous improvement and validation of software quality. This practice encourages review and refinement, fostering a cycle of improvement and precise documentation .

Integrating basic mathematical operations like BMI calculation or currency conversion enhances computational accuracy by using straightforward, verifiable computations. Accurate calculations build user trust, as they rely on the program to deliver precise and reliable outputs. Any errors in these basic operations might compromise user trust, emphasizing the necessity for careful implementation and testing .

A potential challenge arising from currency exchange rate differences is that the program might provide inaccurate exchange values due to fluctuating rates. This can lead to users losing confidence in the program's reliability. The guide suggests resolving this by noting that exchange rates differ over time, hence the rates used in the sample may not be accurate. It implies that using a real-time API for currency rates would improve accuracy, although it doesn't explicitly state this solution .

The guide integrates iterative development by prompting users to decide if they wish to repeat the program after completing an operation. This is implemented through a while loop that continues the program based on user input. The benefit of this approach is that it allows for continuous testing and user feedback, providing the opportunity to refine features and improve user satisfaction iteratively .

You might also like