This assignment was a major issue. The main problem in this was the use of the random number. To make a random number, you have to use seconds. This made me have to include the time as a variable, and give the program access to the time on the computer. This, coupled with the need to have variables and loops, made this out to be one of the hardest projects in the class up to date.
By adding if and while statements, i was slowly able to put together a working guessing game.
0 Comments
For the greedy Project, the biggest problem was the multiple variables, and changing between them. This proved to take some time, and it still was not accepting them as separate variables.
To solve this i took each variable separately and made sure that they were not overlapping in syntax or function. After doing this, a couple of small fixes to semi-colon placements ensured that i was greedy for a finished project no more. For the Fahrenheit problem, a new challenge was created. How to add and subtract a variable inside of the code. To solve this issue, I had to figure out the syntax of the code to change the numeral based variable.
i solved this issue by experimenting until i found the correct syntax. For the name project, one of the hardest things was trying to figure out how to make an input avalible to change the output of the program. One of the issues I was faced with was the fact that you needed to use the input in the output, not only just ask for an imput.
I solved this issue by finding out how to take the input and use it with the "scanf(%f)" funtion. After this the program worked fully, and was ready to be used. When first was given this task, it frankly worried me. My lack of coding skills was apparent to me, and I had no idea where to start. Once I began, I learned that this task was actually quite simple, and needed only a few lines of code. Despite its simplicity, I quickly learned that a simple mistake in code can make the entire process fail.
I accidentally forgot a semicolon at the end of the line, "printf("hello world!")", making the entire thing error out. Once this error was fixed, it worked flawlessly. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |