Like Tree2Likes
  • 1 Post By grumpy
  • 1 Post By grumpy

Big Problems With Various Questions

This is a discussion on Big Problems With Various Questions within the C Programming forums, part of the General Programming Boards category; Hi, I'm COMPLETELY confused over my assignment for this week. We have ten questions. 1. Change a user input string ...

  1. #1
    Registered User
    Join Date
    Oct 2011
    Posts
    81

    Big Problems With Various Questions

    Hi,

    I'm COMPLETELY confused over my assignment for this week.

    We have ten questions.

    1. Change a user input string from lowercase to uppercase.

    2. Turn a user input string from string to ASCII code.

    3. Take a user input string and change lowercase to uppercase and uppercase to lowercase.

    4. Take two user input strings and test to see if they are equal, if not have program print second first and first second.

    5. Get a user input three digit integer and print it first as a three digit number and then print the characters i.e. input 123, you input 123, the characters you input were 1, 2, 3

    6. Put first 1000 prime numbers in an array and print each 15th number.

    7. Using only putchar and loops print
    *
    **
    ***
    ****
    *****
    ******
    *******
    *********
    **********

    8. Same as above except, take user input size for width and height and print diamond, i.e. user inputs 9 then height and width must be 9


    I haven't put anything here as per homework done as quite simply I've been unable to do anything. My question is not, obviously, for you to write anything for me as I haven't done anything yet. Its just can anyone recommend where I can find how to do this as my lecturer neglected to tell us how to do ANY of this stuff in his lecture.

    Websites, books, journals, YouTube tutorials anything. PLEASE! Otherwise I'll just end up submitting nothing (which I'm starting to think is what he wants - i.e. students to drop out so he doesn't have to do as much work).

  2. #2
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Interista View Post
    My question is not, obviously, for you to write anything for me as I haven't done anything yet. Its just can anyone recommend where I can find how to do this as my lecturer neglected to tell us how to do ANY of this stuff in his lecture.
    You might try a different school.

    Any teacher who would give a student assignments without covering prerequisites in class should be fired.
    Any student who doesn't listen in class well enough to gather prerequisite information deserves to fail.

    Sorry... just how it is.

  3. #3
    Registered User
    Join Date
    Oct 2011
    Posts
    81
    Quote Originally Posted by CommonTater View Post
    You might try a different school.

    Any teacher who would give a student assignments without covering prerequisites in class should be fired.
    Any student who doesn't listen in class well enough to gather prerequisite information deserves to fail.

    Sorry... just how it is.
    I don't disagree.

    He's covered in a very basic manner strings, input/output, getchar and for loops but he hasn't covered how to change strings from upper to lower case. Nor how to change strings to ascii code. I know its not that I haven't listened because (a)I listened to him, even though he's so monotone its sleep-inducing; (b)I've read the lecture notes that were put up online; (c)other students say the same thing.

    I can't change school, I'm enrolled and am going well on all other modules (even on his, no thanks to him, more thanks to you guys and TheNewBoston).

    The problem is I can't find a book which explains what he wants me to do this week. If I can find it then I'm not that far from passing his module, when I can ensure I never meet him again by avoiding his modules.

  4. #4
    Registered User
    Join Date
    Jun 2005
    Posts
    5,894
    Your lecturer may not have told you specifically how to answer these questions. However, the questions you are asking are VERY VERY BASIC.

    Your lecture almost certainly included items of information that, when combined with things you should know or combined with other information in the lectures, allow you to solve each question.

    As an example, you will almost certainly have been told what a string is in C, and what sort of code is needed to read one. You can reasonably be expected to know what upper and lower case letters are (it is a basic bit of knowledge to read and write english, and you have demonstrated you know how to do that). Put those three bits of information together, and you will be able to solve the first question.

    While there are some lousy lecturers out there, there are not that many who would deliberately set up students for failure. In my experience, when a lecturer is accused of such things, the most common reason is unrealistic expectations of students (for examples, students expecting to be spoon fed or students who have not bothered to take notes during lectures).

    If all else fails, any introductory text on C will be enough to help you solve the problems. Again, however, the books will probably not answer the questions directly. You will need to do some work of actually reading the book, breaking each question into pieces, relating those pieces to information in the textbook, and assembling an answer that way.

    Given that computer programming is all about problem-solving, just submitting nothing would actually provide evidence you are not cut out to be software developer. The easiest way to provide evidence otherwise is to TRY.
    rags_to_riches likes this.
    Right 98% of the time, and don't care about the other 3%.

  5. #5
    Registered User
    Join Date
    Oct 2011
    Posts
    81
    Quote Originally Posted by grumpy View Post
    Your lecturer may not have told you specifically how to answer these questions. However, the questions you are asking are VERY VERY BASIC.

    Your lecture almost certainly included items of information that, when combined with things you should know or combined with other information in the lectures, allow you to solve each question.

    As an example, you will almost certainly have been told what a string is in C, and what sort of code is needed to read one. You can reasonably be expected to know what upper and lower case letters are (it is a basic bit of knowledge to read and write english, and you have demonstrated you know how to do that). Put those three bits of information together, and you will be able to solve the first question.

    While there are some lousy lecturers out there, there are not that many who would deliberately set up students for failure. In my experience, when a lecturer is accused of such things, the most common reason is unrealistic expectations of students (for examples, students expecting to be spoon fed or students who have not bothered to take notes during lectures).

    If all else fails, any introductory text on C will be enough to help you solve the problems. Again, however, the books will probably not answer the questions directly. You will need to do some work of actually reading the book, breaking each question into pieces, relating those pieces to information in the textbook, and assembling an answer that way.

    Given that computer programming is all about problem-solving, just submitting nothing would actually provide evidence you are not cut out to be software developer. The easiest way to provide evidence otherwise is to TRY.
    OK, so the fact he hasn't taught us the code for changing uppercase to lowercase is acceptable?

    I'm a teacher myself and am aware of the difference between (a)teaching and (b)shouting from a parapet which is what this guy does.

    And setting us up to fail? I have strong suspicions, we drop out, suddenly he can concentrate on what earns more money, writing programs and writing books.
    Last edited by Interista; 11-02-2011 at 06:53 AM.

  6. #6
    Registered User
    Join Date
    Oct 2011
    Posts
    81
    And its not being lazy to not understand something and ask is there something I can read that would make more sense...

    If more than one student (and most on the course are in the same boat) can't understand the lecturer its doubtful the problem are the students.

    And chillax a bit, maybe these things are incredibly basic FOR YOU, you are a professional programmer, if it wasn't easy for you there'd be something amiss, but I'm a beginner, remember you were there too once.

  7. #7
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Interista View Post
    If more than one student (and most on the course are in the same boat) can't understand the lecturer its doubtful the problem are the students.
    In your place I'd look up some good tutorials on the web ( for EXAMPLE ) and distribute the URLs to other students... you should not have to fail because of a bad teacher.

    And chillax a bit, maybe these things are incredibly basic FOR YOU, you are a professional programmer, if it wasn't easy for you there'd be something amiss, but I'm a beginner, remember you were there too once.
    Indeed, some here do forget the huge gaps in skill between a first semester student and a 10 year professional. It doesn't help you much when you don't understand the problem... then can't understand the explaination.
    Last edited by CommonTater; 11-02-2011 at 09:36 AM. Reason: Fixed url.

  8. #8
    Registered User
    Join Date
    Oct 2011
    Posts
    81
    Quote Originally Posted by CommonTater View Post
    In your place I'd look up some good tutorials on the web ( for EXAMPLE) and distribute the URLs to other students... you should not have to fail because of a bad teacher.



    Indeed, some here do forget the huge gaps in skill between a first semester student and a 10 year professional. It doesn't help you much when you don't understand the problem... then can't understand the explaination.
    Thanks s much for that!

    I'll certainly distribute it to my students.

    It gets my goat a bit when experts tell us what we should know as its "so basic". Its incredibly basic for me to say, for example, "ieri son'andato alla cinema" (I went to the cinema yesterday), but only because I have been learning that language and using it for years. I wouldn't expect someone who has only just started to produce it so easily.

    Thanks again!

  9. #9
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Interista View Post
    Thanks s much for that!

    I'll certainly distribute it to my students.

    It gets my goat a bit when experts tell us what we should know as its "so basic". Its incredibly basic for me to say, for example, "ieri son'andato alla cinema" (I went to the cinema yesterday), but only because I have been learning that language and using it for years. I wouldn't expect someone who has only just started to produce it so easily.

    Thanks again!
    Please note that I've had to fix the URL in the message... I recommend you do some google searches for other tutorials as well, there are a lot of them out there to choose from.

  10. #10
    Registered User
    Join Date
    Oct 2011
    Posts
    81
    Quote Originally Posted by CommonTater View Post
    Please note that I've had to fix the URL in the message... I recommend you do some google searches for other tutorials as well, there are a lot of them out there to choose from.
    Thanks! I already used TheNewBoston and found it really good, the problem is he only goes as far as what we needed for last week.

  11. #11
    Registered User
    Join Date
    Jun 2005
    Posts
    5,894
    Quote Originally Posted by Interista View Post
    OK, so the fact he hasn't taught us the code for changing uppercase to lowercase is acceptable?
    As a matter of fact, it can be.

    Assuming we are english language speakers, we know that the characters 'A' through 'Z' are uppercase, and 'a' through 'z' are lower case. For each character in the range 'A' through 'Z' the mapping from upper case to lower case is mapping 'A' to 'a', 'B' to 'b', ..... 'Z' to 'z'. Any other character would not need to change.

    That sort of logic is easily described - whether it be in english or in a programming language. All you need is an understanding of the criteria by which a character is called "upper case", "lower case" or "something else".

    The only step you need is then to map that description to the programming language (C, in this case). If you have learned what an "if" statement in C is, you can do that.

    Now, okay, there may be better ways of implementing an approach for converting characters to lower case. But the question does not require you to implement the "best" approach. It requires you to implement one approach that will work.

    Once you have one approach that works, you can do a bit of research and find techniques to optimise your conversion function.

    Quote Originally Posted by Interista View Post
    I'm a teacher myself and am aware of the difference between (a)teaching and (b)shouting from a parapet which is what this guy does.
    There are teachers and there are teachers.

    "Shouting from a parapet" as you describe it is also known traditionally as "lecturing". It is a teaching method that has been used for centuries in university halls, because it scales to very large class sizes (if it works for 10 students, it can also works for a park containing 10000 students if the technical measures are in place so the students can hear the lecturer). Yes, it is different from classroom teaching or tailoring material for each student, but it is a valid form of teaching.

    The basis of lecturing is projecting relevant information (the principles) and relying on the student to map those principles in application.

    Quote Originally Posted by Interista View Post
    And setting us up to fail? I have strong suspicions, we drop out, suddenly he can concentrate on what earns more money, writing programs and writing books.
    I think you are simply failing to adapt to a teaching (in this case, lecturing) style that differs from what you have experienced in the past.

    I remember having a shock similar to you in my first year in a university science degree. I showed up one day for the first lecture of a physics subject. The class size was four hundred students, in a large lecture hall. In three lectures over the first week of term, the lecturer took the class through a "recap" of prerequisite material. The only tools he used to do that were his voice and a blackboard that covered the entire front of the lecture hall (on which he wrote in letters large enough to be seen from the back of the lecture hall).

    All of the students in that class had completed high-school physics (it was the formal prerequisite for enrollment). In that recap of the first week, the lecturer went through all the material taught in high-school physics, and covered it in more completely and in significantly more detail than any of my high-school teachers had.

    In that first week, about 20 students dropped out. They could not handle the pace. Over the term, the total number of students who dropped out was about 100. Only about half a dozen dropped out in later terms (most of those for reasons unrelated to the challenges of the subject). I was one of the students who stuck with it.

    I also spent time in practical classes, taken by that same lecturer. One on one, he was helpful, but his approach was still based on giving hints and suggestions rather than simply giving "cook book" answers.

    To get through that course, I learned the value of self-directed research. Based on pointers that the lecturer gave - which usually amounted to descriptions of the base principles - I found good textbooks, and learnt material that had been covered in the lecture, and I learned material that had only been touched on in the lectures.

    In the first week of those lectures, I learned more about physics than I had ever learned in high school. And that was just setting the scene for learning over the whole year.

    That lecturer was on the receiving end of accusations like yours. Some students claimed he didn't care about helping them. Others complained about him "shouting from the parapet". Others claimed he was setting them up for failure. The reality is that he was quite happy to help, but expected the students to take responsibility for their own learning rather than spoon-feeding.

    I am not saying that all lecturers are high-quality teachers. But, from your posts, I consider it is likely you need to do a bit of self-examination. The questions you are asking are VERY VERY BASIC. Your complaints are typical of someone who expects a teacher to cater to him, rather rather than accepting responsibility for your own learning.

    And even if your teacher is one of the bad ones.... so what? The hallmark of a good student is one who works hard enough to get through a class, even if the going is tough.
    Last edited by grumpy; 11-02-2011 at 11:52 AM.
    TheBigH likes this.
    Right 98% of the time, and don't care about the other 3%.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. questions....so many questions about random numbers....
    By face_master in forum C++ Programming
    Replies: 2
    Last Post: 07-30-2009, 08:47 AM
  2. fread problems or memory problems
    By Lechuza in forum C Programming
    Replies: 1
    Last Post: 03-22-2009, 12:45 PM
  3. C++ Problems/Questions/Projects
    By {MaX} in forum C++ Programming
    Replies: 1
    Last Post: 06-12-2006, 07:25 AM
  4. Linking problems, class problems
    By Kheila in forum C++ Programming
    Replies: 12
    Last Post: 11-22-2005, 12:47 AM
  5. 3 Questions
    By Brain Cell in forum C Programming
    Replies: 6
    Last Post: 06-20-2004, 06:43 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21