Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
71 views

Python - 1. Introduction To The Python Language

The document introduces the Python programming language. It discusses what programming languages are used for and some common uses of Python. The document then provides instructions on setting up a Trinket account and using basic print functions in Python.

Uploaded by

luxiusgamer47
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views

Python - 1. Introduction To The Python Language

The document introduces the Python programming language. It discusses what programming languages are used for and some common uses of Python. The document then provides instructions on setting up a Trinket account and using basic print functions in Python.

Uploaded by

luxiusgamer47
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Introduction to the Python language

Programming languages ​are a way of telling a computer what to do. It's like giving
commands to a robot, but instead of using words, we use a special language called code.
Programming languages ​have their own rules and syntax, and each is suitable for different
purposes.
Programmers write code to do things like create video games, desktop applications, mobile
apps, or web pages. They can even use programming languages ​to analyze large amounts
of data and make predictions.
Programming languages ​are used in a wide variety of fields, from computer science and
engineering to financing and data analysis. Knowledge of a programming language is a
valuable skill for anyone who wants to work in the technology field.
In this course we will learn to program in Python language. Python is a very popular and very
powerful programming language. It is used to do many different things, such as creating web
applications, analyzing data, creating artificial intelligence programs, and even controlling
robots. It is a very easy language to learn and has a clear and simple syntax, which means it
is easy to read and write.
Additionally, there is a lot of information and resources available online for learning Python,
making it even more accessible. You can find tutorials, books, and videos to help you get
started programming in Python.
Would you like to be a programmer in the future? Learning Python is a great start! With
dedication and practice, you can do many amazing things with this language. Good luck on
your Python learning journey!

Trinket
You need a Trinket account, maybe you already have one. If not, go to; https://trinket.io/ and
create an account using your email address (@eiris.edu.es). The main page should be
something like this:
Pressing “new trinket”, choose “Python”. A programming environment will appear like the
one you can see in the following image:

The print() function


print(*objects, sep=' ', end='\n')

The print() function is used to print text, numbers, and other objects to the screen.

It is a very useful tool when it comes to finding programming errors and to report on the
development of the program.

The sep parameter indicates which character to use to separate the various objects that will
be printed on the screen. Default is white space.

The end parameter indicates which character to use at the end of printing. It defaults to a
new line '\n', but it can be replaced with an empty string '' so that successive print prints on
the same line. You need to press “Run” to execute the program.

Examples:

Another example:
Exercise

Write a program that calculates and prints the mean of three grades: 5, 8, 9

You might also like