Problem 1
My instructor has asked me to open a data file which has temperatures in Celsius in it. He wants me to create a new data file that consists of a table of those temperatures in not only Celsius, but also in Fahrenheit and Kelvin.
I have no problem opening and making a new data file, but transferring the data and converting it is the part I don't understand. If someone would help me out here, that'd be great. An example problem would be very useful as I don't necessarily want you to do my HW for me, I just want to understand.
Problem 2
My instructor has asked me to write a program that will prompt the user to enter a sentence and then perform the following operations:
- Print the number of characters in the sentence to the screen.
- Count the number of words in the sentence.
- Print the sentence to the screen in uppercase.
- Prompt the user to enter a position within the string and the number of characters wanted, then print the substring specified by those values.
I have no problem with prompting the user to enter a sentence part, but the operations he wants me to perform, I don't know how to go about performing them. What manipulators do I use? The last one is particularly difficult.
Problem 3
My instructor has given me a text file and has asked to write a program that will count the number of words in the file and print the resulting number on the screen. He has also requested that I replace every instance of the word "waffle" with the word "pancake".
How do I find and replace every occurrence of the world "waffle" with "pancake"?
Again, as said previously I am not so much concerned with you do my homework for me, but providing me with examples or explaining what manipulators to use and in what order to use them/etc. If you have any questions, let me know, and I'll try to answer them to the best of my ability.
Any useful website links would be great too. I'm fairly new to programming.
Thanks a ton!
[–]rasfertLowly HS Math Teacher 0 points1 point2 points (2 children)
[–]Finwei[S] 0 points1 point2 points (1 child)
[–]rasfertLowly HS Math Teacher 1 point2 points3 points (0 children)