0% found this document useful (0 votes)
42 views10 pages

S5. Hello World

This document provides an introduction to computational thinking and the Python programming language. It discusses hardware and software components of computers, computer languages and their syntax, and basic Python functions like print() and input(). The print() function outputs text or values to the console, while input() allows the user to enter input. The document directs the reader to an activity to practice what they've learned about the Hello World program.

Uploaded by

El Yisus God
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views10 pages

S5. Hello World

This document provides an introduction to computational thinking and the Python programming language. It discusses hardware and software components of computers, computer languages and their syntax, and basic Python functions like print() and input(). The print() function outputs text or values to the console, while input() allows the user to enter input. The document directs the reader to an activity to practice what they've learned about the Hello World program.

Uploaded by

El Yisus God
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Hello World!

Module 1: Principles of Computational Thinking


Hello World!

Hardware Software

All the physical components that Set of steps that tell a computer what
make up a computer. to do, also known as programs
Examples: Operating System,
Examples: input devices like
Applications, Computational
keyboard and output devices like Languages
printer, CPU, memory and storage.
Hello World!

Computer Languages

Language is used in the daily Computer languages are similar to


communication of life. spoken languages in that we must
It can be used effectively to use them accurately so as not to be
communicate intentions, needs, misinterpreted by the computer
wishes or feelings.
Hello World!

Each language has its own grammar or SYNTAX, which must be followed for the computer to
understand this language. The programmer must learn to "speak" this language. Various
languages can be learned, and this is not difficult since the programming languages share
many concepts.
Hello World!

Python
Hello World!

Function print()
The print () function prints what is in the parentheses to the console.
If it is an integer or real number, simply enter it; if it is a text, you must put it in single or double
quotes

Python Output
print("Hello World!")
print(123)
print(1,2,3)
print("Hello","World")
print("Hello" "World")
print(200.45)
Hello World!

Function print()
By default the print() ends with a newline (“\n”) This can be changed to any character using the
parameter “end”. See the examples below:

Python Output
print("Hello World!",end = "*")
print("How are you?")

print("Hello World!",end = "")


print("How are you?")

print("Hello World!",end = " ")


print("How are you?")

print("Hello World!")
print("How are you?")
Hello World!

Function input()

The input () function allows the user to enter input data.


You can put a phrase between single or double quotes inside the parentheses to indicate to the user what
they are expected to enter from input data.

Python Output / Input


input()
input("Give me a number")
input("What is your favorite color?")
input("Where you live?")
Hello World!

Now go to the activity:


S5. Hello World
CRÉDITOS
Ana Isabel Ramos Elizondo Laura Guadalupe Molina Salgado
[email protected] [email protected]

Francisco J. Guerra Treviño Dan Omar Marrón Muñoz


[email protected] [email protected]

Federico Enrique Berndt M.


[email protected]

You might also like