Introduction
Introduction to Programming
Main Parts of Computer: Computer is made of different parts.CPU
CPU or Central Processing Unit is the brain of computer. It is very good at doing one work at a time and at a very fast speed.
RAM
Devices
Purpose of Programming
Purpose of programming is to control the input and output devices connected to computer. We will start with programming monitor as output device.Python
Python is an easy to understand programming language for kids. You can get the latest version of Python from https://www.python.org/downloads/.Start Python
Once you have Python installed, you can open command prompt and type "python". Once you see a prompt with ">>>" three angular brackets, you are on
akhileshtiwari$ pythonPython 2.7.16 (default, Aug 24 2019, 18:37:03)[GCC 4.2.1 Compatible Apple LLVM 11.0.0 (clang-1100.0.32.4) (-macos10.15-objc-s on darwinType "help", "copyright", "credits" or "license" for more information.>>>
print function
- You use print function to print something on the monitor's screen.
>>> print("hello world!")hello world!>>>
- You can pass string values in single and double quotation marks to print the value on screen.
- Check why there are two options to pass single and double quotation marks.
Aashi-
ReplyDelete# Answers from Aashi
#1.
print("Hello World!\n\nHi,I'm home.\n\nOsh says \"Hello Radha!\"\n\nRadha says \"Hello Osh.How're you?\"")
#2. Any data or information that is provided to pass in a function.
#3.The value returned by a passed function.
#4. The input function collects data or information from the users. It does take parameters(a string which shows on the user's screen, usually a question for the data.)
#5.A string return value.
#6:
#a. print(Hello World!)
print("Hello World!")
#b. print("Hello "How are you?"")
print('Hello "How are you?"')
#c. print("Good morning')
print("Good morning")
#d. print(2345) No error
#e. print("Hello world" + 'how is everyone') No error