Skip to main content

Input Manipulation Using Python

Welcome back to my blog. This post is for the projects in the Computer Science class. In Computer Science we have been learning about different types of coding and how computers work. We have done math problems in binary code and practiced making something from using python. In these two projects we used python to code a advanced calculator that you can use to find what the temperature in Celsius is based off of your input of your temperature outside in Fahrenheit. The second project here is a code that uses your inputs to create a letter to a state representative to talk about something important to you. Both of these codes have been checked multiple times to see if there were any errors or changes that needed to be made. If you would like to try them out for yourself you can do so by typing in your responses on the right to the questions that are asked.

The first project is an advanced calculator that takes an input of a given temperature in Fahrenheit and converts it into Celsius for the user. I was able to do this by putting the formula into python and having the user enter a number that follows that formula to calculate the result. To run this and see how it works all you need to do is type in the temperature in Fahrenheit for you and press enter.

Advanced Calculator:


The second project is a form letter that could be used when writing about some community issues or problems that you care about to a state representative or alderman. This code requires multiple inputs that the user puts in and then it will print them out into a group of sentences. To see this function you just answer the few questions that it prompts you with and will create the letter.

Form Letter:

Those are both of the coding projects that I have created. I hope that they were easy to manage and worked well for you. I had some fun when building them and its nice to see that after many tries you can eventually get your code fixed. Creating the calculator was a little challenging when trying to make the formula run smoothly and have the code identify certain pieces as integers that have to be put into a string for it to be layed out like that. Sometimes the coding can be complicated but I solved it in the end thanks to feedback and my father who works a web designer. It was cool to see what other projects my classmates made compared to my own and see their process of creation. Coding can be used for so much more than changing Fahrenheit to Celsius and I can't wait to use it more in the future.

Comments

Popular posts from this blog

Food, a Human Right?

In our Humanities or SDGs class, Sustainable Development Goals, we were talking about the certain goals that could be thought of as a need to be a human right. The options were no poverty, no hunger, and quality education. The goal that I chose was number two, no hunger. I believe that food should be a human right because it is primarily a basic need. We need food to survive and if we do not have it we will obviously die, since that is the only alternative. Before then we went on a field experience to Lincoln Park Community Services in Chicago. There we experienced people who are hungry and we also as a class, cooked for the people that attended the lunch. I personally enjoyed this because I was able to talk with people that needed food and they were really appreciative of the food that they had been given. This led to the action project which is an essay about our chosen goal. The essay is below. To, Hiu, LPCS 2019, One of the food items cooked was chicken. Could you imagine...

Can You Spell Sub-Bituminous Coal?

The first unit of this winter term was very interesting in the Fuel class for STEAM. We did a lot of talking about energy and different types of fuel. Some of these include the known fossil fuels, natural gas, oil, coal, and also renewable sources of energy like solar and wind. We also watched the documentary Pump which is about people having a choice at the gas pump and being able to decide what fuel they should use for their car. In this unit we talked to someone from Nicor Gas where we found some extra opinion on the use of natural gases and the other fuels we use today. This unit largely talked about fossil fuels and how we use them in our daily lives without even realizing it. We might be getting our power in our home from a coal plant and our car uses gas. Even though we may fill up our cars about once every couple weeks we may not actually think about what is happening somewhere that is allowing us to have this gas. In this unit we also did a lot of graphing and predictions for ...