in my i.t lesson we were intoduced to 'raspberry pi' within 'Python' and for my homework i have to explain what we did in the lesson. It says i have to include what 'input' is when coding a programme. Please help and reply as soon as possible and keep in mind i dont really understand computer or technology language/words!
Plus, i remember watching my teacher show us on the board something along the lines of "end/run command/programme when enter is clicked" can anyone help me with that?
Thanks!!

It would be impossible for us to tell you how to describe a lesson we haven't seen ourselves. I can make a few guesses on things, but I can't be certain they are correct.

  • I think you have the relationship between Raspberry π and the Python language interpreter reversed. The Raspberry Pi is a small computer that usually runs a variant of the Linux operating system. The Python interpreter is a program that runs on the computer.
  • As for the last part, I suspect that what the instructor wrote would have been something like:

    • Edit - typing the program into the Python interpreter or into a file
    • Run - executing the program; in the interpreter, hitting the 'Enter' key will start the snippet of code you've entered running
  • In general, 'input' is the process of getting information from someplace (e.g., the keyboard) into the program. In this case, the instructor probably is referring to the input() function, which is what you use to get input from the user - it will type out a string (a sequence of letters or other characters) and then wait until the user types something and hits the 'Enter' key. Once the user hits 'Enter', whatever they typed is sent to the program. For example:

    x = input('Please enter your name: ')
    

will put whatever the user has typed (which you hope is their name) into the variable x (a variable is a place in memory which can hold a datum, such as, oh, someone's name). The converse of this is the print() function, which sends something to the viewing window.

print('Your name is {}'.format(x))

which, if the value in x is 'Schol-R-LEA', will print out Your name is Schol-R-LEA. Don't worry about the ,format() part yet; that's just a way of putting a variable's value into the middle of a string (or at least that's the simplest explanation for now, there's more to it but you don't need all the details yet).

Mind you, Python isn't specific to the Raspberry Pi; you may have a Python interpreter on your computer at home already, and if not, you can easily get one from here (scroll down the page to where it says 'Download' and choose the one for your operating system - probably the Windows X86-64 MSI Installer, unless you have a Mac, in which case you probably want the Mac OS X 64-bit/32-bit Installer). You should be able to use the IDLE editor/interpreter program to write programs and test things out.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.