SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Using Python
or how to code snake language in windows
About Python…
Python is a common programming
language…
It is used for a large variety of applications,
for example, analytical software.
Code
import os
x = os.getcwd() #Assigns the current directory to x
print(x)
-------------------------------------------------------------------------------------
Output
C:UsersSebastianDownloads
A simple Python program looks like
above.
Explanation time…
Code
import os
x = os.getcwd() #Assigns the current directory to x
print(x)
-------------------------------------------------------------------------------------
Output
C:UsersSebastianDownloads
The purples are statements. The import statement tells the computer to grab
a prewritten piece of code and implement it easily…
Code
import os
x = os.getcwd() #Assigns the current directory to x
print(x)
-------------------------------------------------------------------------------------
Output
C:UsersSebastianDownloads
The greens are modules. Modules are a way to write code so that you can
implement it easier in other parts of your code…
The reds are variables. The x is here assigned to the value of os.getcwd().
Variables are a way to store data that will be used later, either, for example,
for calculations, or for text manipulation…
Code
import os
x = os.getcwd() #Assigns the current directory to x
print(x)
-------------------------------------------------------------------------------------
Output
C:UsersSebastianDownloads
Code
x = ‘Hello you’ #x is now a string-variable
y = 7 #y is now a number-variable
print(x)
print(y)
-------------------------------------------------------------------------------------
Output
Hello you
7
Here’s a visual demonstration of different kinds of variable values and how
the values are stored to a variable. The ‘Hello you’ is a string, and the 7
is an integer, shortened int…
Code
import os
x = os.getcwd() #Assigns the current directory to x “””
print(x)
-------------------------------------------------------------------------------------
Output
C:UsersSebastianDownloads
The grey are comments. The # represents a single line comment, which is
used when there needs to be a quick explanation, such as above. There is also
the “””…“”” which is a multiline comment, mostly used to comment away
sections of code that isn’t used. The comments does nothing when the
program runs…
Code
import os
x = os.getcwd() #Assigns the current directory to x
print(x)
-------------------------------------------------------------------------------------
Output
C:UsersSebastianDownloads
And finally, the blues are functions. Functions is a block of organized, reusable
code that is used to perform a single, related action. Functions provide better
modularity for your application and a high degree of code reusing…
Now it’s time to install Python…
Start by going to
https://www.python.org/downloads/...
Then click the download button for the version of Python you
want, we are using Python 3.4.* for the code in this
presentation…
Finally it is just a matter of following the
instructions given.
Even though Python has a large built in library, it
lacks certain modules to ease the code-writing…
Therefore, we’ll now guide you through the
process of installing more libraries to Python…
Start by downloading the library you want to install,
we’ll install the wikipedia library in this tutorial…
If there is a .exe file to download, download and run it, and it’s
installed. Otherwise, download the .gz.tar file and unzip it to the
folder where Python is, using e.g. WinRAR…
This is what my
Python folder
looks like.
After that it’s time to start the old CMD. When it’s started,
navigate to the Python folder, it should look something like the
picture above…
Now it’s time to install the library. Type in the code shown above in to CMD to
start the installation, but remember to type in the name of the library you’re
installing instead of wikipedia…
Python –m pip install wikipedia
That’s it!
By Sebastian Grunditz and Samuel Håkansson

Weitere ähnliche Inhalte

Was ist angesagt? (19)

Hosts
HostsHosts
Hosts
 
Hosts
HostsHosts
Hosts
 
Hosts
HostsHosts
Hosts
 
Linux Commands - 3
Linux Commands - 3Linux Commands - 3
Linux Commands - 3
 
101 3.2 process text streams using filters
101 3.2 process text streams using filters101 3.2 process text streams using filters
101 3.2 process text streams using filters
 
Linux Commands - Cheat Sheet
Linux Commands - Cheat Sheet Linux Commands - Cheat Sheet
Linux Commands - Cheat Sheet
 
Hosts
HostsHosts
Hosts
 
Hosts
HostsHosts
Hosts
 
Hosts
HostsHosts
Hosts
 
test
testtest
test
 
Hosts yes
Hosts yesHosts yes
Hosts yes
 
Hosts
HostsHosts
Hosts
 
Hosts
HostsHosts
Hosts
 
Hosts
HostsHosts
Hosts
 
Programming Assignment Help
Programming Assignment HelpProgramming Assignment Help
Programming Assignment Help
 
Hosts
HostsHosts
Hosts
 
Instruction addressing and execution
Instruction addressing and executionInstruction addressing and execution
Instruction addressing and execution
 
Hosts para a info
Hosts para a infoHosts para a info
Hosts para a info
 
Hosts
HostsHosts
Hosts
 

Andere mochten auch

Austin Benn - How to deal with a multi-generational workforce
Austin Benn - How to deal with a multi-generational workforceAustin Benn - How to deal with a multi-generational workforce
Austin Benn - How to deal with a multi-generational workforceJade Webster
 
WareHouse Addition
WareHouse AdditionWareHouse Addition
WareHouse AdditionB Kneeland
 
Diplome Maltherapeut
Diplome MaltherapeutDiplome Maltherapeut
Diplome MaltherapeutDino Toniolo
 
Austin Benn Recruitment - Sales & Marketing Newsletter (Clients) Issue 4
Austin Benn Recruitment - Sales & Marketing Newsletter (Clients) Issue 4Austin Benn Recruitment - Sales & Marketing Newsletter (Clients) Issue 4
Austin Benn Recruitment - Sales & Marketing Newsletter (Clients) Issue 4Jade Webster
 
UK Export Finance : Presentation for China event
UK Export Finance : Presentation for China eventUK Export Finance : Presentation for China event
UK Export Finance : Presentation for China eventClaire3039
 
Asian monetary cooperation£ºtheory and possibility
Asian monetary cooperation£ºtheory and possibilityAsian monetary cooperation£ºtheory and possibility
Asian monetary cooperation£ºtheory and possibilityR_24
 
Digital Transformational Trends in Insurance
Digital Transformational Trends in InsuranceDigital Transformational Trends in Insurance
Digital Transformational Trends in InsuranceChristopher King
 
Austin Benn Sales and Marketing Newsletter (clients) - Issue 3
Austin Benn Sales and Marketing Newsletter (clients) - Issue 3Austin Benn Sales and Marketing Newsletter (clients) - Issue 3
Austin Benn Sales and Marketing Newsletter (clients) - Issue 3Jade Webster
 

Andere mochten auch (20)

CAMBIOS CLIMATICOS
CAMBIOS CLIMATICOSCAMBIOS CLIMATICOS
CAMBIOS CLIMATICOS
 
Ami Polymer Pvt Ltd
Ami Polymer Pvt LtdAmi Polymer Pvt Ltd
Ami Polymer Pvt Ltd
 
احمد السيد
احمد السيداحمد السيد
احمد السيد
 
Nouns
NounsNouns
Nouns
 
The Company Searcher
The Company SearcherThe Company Searcher
The Company Searcher
 
Austin Benn - How to deal with a multi-generational workforce
Austin Benn - How to deal with a multi-generational workforceAustin Benn - How to deal with a multi-generational workforce
Austin Benn - How to deal with a multi-generational workforce
 
WareHouse Addition
WareHouse AdditionWareHouse Addition
WareHouse Addition
 
Diplome Maltherapeut
Diplome MaltherapeutDiplome Maltherapeut
Diplome Maltherapeut
 
Austin Benn Recruitment - Sales & Marketing Newsletter (Clients) Issue 4
Austin Benn Recruitment - Sales & Marketing Newsletter (Clients) Issue 4Austin Benn Recruitment - Sales & Marketing Newsletter (Clients) Issue 4
Austin Benn Recruitment - Sales & Marketing Newsletter (Clients) Issue 4
 
Nouns
NounsNouns
Nouns
 
Darkfield LED Array
Darkfield LED ArrayDarkfield LED Array
Darkfield LED Array
 
6th
6th6th
6th
 
UK Export Finance : Presentation for China event
UK Export Finance : Presentation for China eventUK Export Finance : Presentation for China event
UK Export Finance : Presentation for China event
 
Chameleon Technologies
Chameleon TechnologiesChameleon Technologies
Chameleon Technologies
 
Resume02052015
Resume02052015Resume02052015
Resume02052015
 
RAINBOW by ECS-3.COM:
RAINBOW by ECS-3.COM: RAINBOW by ECS-3.COM:
RAINBOW by ECS-3.COM:
 
Asian monetary cooperation£ºtheory and possibility
Asian monetary cooperation£ºtheory and possibilityAsian monetary cooperation£ºtheory and possibility
Asian monetary cooperation£ºtheory and possibility
 
Digital Transformational Trends in Insurance
Digital Transformational Trends in InsuranceDigital Transformational Trends in Insurance
Digital Transformational Trends in Insurance
 
Linea de tiempo
Linea de tiempoLinea de tiempo
Linea de tiempo
 
Austin Benn Sales and Marketing Newsletter (clients) - Issue 3
Austin Benn Sales and Marketing Newsletter (clients) - Issue 3Austin Benn Sales and Marketing Newsletter (clients) - Issue 3
Austin Benn Sales and Marketing Newsletter (clients) - Issue 3
 

Ähnlich wie Using Python

Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...
Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...
Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...Joachim Jacob
 
Hack Like It's 2013 (The Workshop)
Hack Like It's 2013 (The Workshop)Hack Like It's 2013 (The Workshop)
Hack Like It's 2013 (The Workshop)Itzik Kotler
 
Bsc cs i pic u-1 introduction to c language
Bsc cs i pic u-1 introduction to c languageBsc cs i pic u-1 introduction to c language
Bsc cs i pic u-1 introduction to c languageRai University
 
introduction to c language
 introduction to c language introduction to c language
introduction to c languageRai University
 
Btech i pic u-1 introduction to c language
Btech i pic u-1 introduction to c languageBtech i pic u-1 introduction to c language
Btech i pic u-1 introduction to c languageRai University
 
Mca i pic u-1 introduction to c language
Mca i pic u-1 introduction to c languageMca i pic u-1 introduction to c language
Mca i pic u-1 introduction to c languageRai University
 
Diploma ii cfpc u-1 introduction to c language
Diploma ii  cfpc u-1 introduction to c languageDiploma ii  cfpc u-1 introduction to c language
Diploma ii cfpc u-1 introduction to c languageRai University
 
Programming methodology-1.1
Programming methodology-1.1Programming methodology-1.1
Programming methodology-1.1NYversity
 
2018-Summer-Tutorial-Intro-to-Linux.pdf
2018-Summer-Tutorial-Intro-to-Linux.pdf2018-Summer-Tutorial-Intro-to-Linux.pdf
2018-Summer-Tutorial-Intro-to-Linux.pdfsanjeevkuraganti
 
Whole c++ lectures ITM1 Th
Whole c++ lectures ITM1 ThWhole c++ lectures ITM1 Th
Whole c++ lectures ITM1 ThAram Mohammed
 
Development and deployment with composer and kite
Development and deployment with composer and kiteDevelopment and deployment with composer and kite
Development and deployment with composer and kiteChristian Opitz
 
PythonNotes1.pdf
PythonNotes1.pdfPythonNotes1.pdf
PythonNotes1.pdfShaikfiza5
 
Data analysis in R
Data analysis in RData analysis in R
Data analysis in RAndrew Lowe
 
Introduction to python.pptx
Introduction to python.pptxIntroduction to python.pptx
Introduction to python.pptxpcjoshi02
 
From Zero to Hero - All you need to do serious deep learning stuff in R
From Zero to Hero - All you need to do serious deep learning stuff in R From Zero to Hero - All you need to do serious deep learning stuff in R
From Zero to Hero - All you need to do serious deep learning stuff in R Kai Lichtenberg
 
Declare Your Language: What is a Compiler?
Declare Your Language: What is a Compiler?Declare Your Language: What is a Compiler?
Declare Your Language: What is a Compiler?Eelco Visser
 
(1) cpp introducing the_cpp_programming_language
(1) cpp introducing the_cpp_programming_language(1) cpp introducing the_cpp_programming_language
(1) cpp introducing the_cpp_programming_languageNico Ludwig
 
Batch file programming
Batch file programmingBatch file programming
Batch file programmingswapnil kapate
 
python PPT Session 1.pptx
python PPT Session 1.pptxpython PPT Session 1.pptx
python PPT Session 1.pptxRobertHook14
 
Introduction to C programming
Introduction to C programmingIntroduction to C programming
Introduction to C programmingRokonuzzaman Rony
 

Ähnlich wie Using Python (20)

Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...
Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...
Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...
 
Hack Like It's 2013 (The Workshop)
Hack Like It's 2013 (The Workshop)Hack Like It's 2013 (The Workshop)
Hack Like It's 2013 (The Workshop)
 
Bsc cs i pic u-1 introduction to c language
Bsc cs i pic u-1 introduction to c languageBsc cs i pic u-1 introduction to c language
Bsc cs i pic u-1 introduction to c language
 
introduction to c language
 introduction to c language introduction to c language
introduction to c language
 
Btech i pic u-1 introduction to c language
Btech i pic u-1 introduction to c languageBtech i pic u-1 introduction to c language
Btech i pic u-1 introduction to c language
 
Mca i pic u-1 introduction to c language
Mca i pic u-1 introduction to c languageMca i pic u-1 introduction to c language
Mca i pic u-1 introduction to c language
 
Diploma ii cfpc u-1 introduction to c language
Diploma ii  cfpc u-1 introduction to c languageDiploma ii  cfpc u-1 introduction to c language
Diploma ii cfpc u-1 introduction to c language
 
Programming methodology-1.1
Programming methodology-1.1Programming methodology-1.1
Programming methodology-1.1
 
2018-Summer-Tutorial-Intro-to-Linux.pdf
2018-Summer-Tutorial-Intro-to-Linux.pdf2018-Summer-Tutorial-Intro-to-Linux.pdf
2018-Summer-Tutorial-Intro-to-Linux.pdf
 
Whole c++ lectures ITM1 Th
Whole c++ lectures ITM1 ThWhole c++ lectures ITM1 Th
Whole c++ lectures ITM1 Th
 
Development and deployment with composer and kite
Development and deployment with composer and kiteDevelopment and deployment with composer and kite
Development and deployment with composer and kite
 
PythonNotes1.pdf
PythonNotes1.pdfPythonNotes1.pdf
PythonNotes1.pdf
 
Data analysis in R
Data analysis in RData analysis in R
Data analysis in R
 
Introduction to python.pptx
Introduction to python.pptxIntroduction to python.pptx
Introduction to python.pptx
 
From Zero to Hero - All you need to do serious deep learning stuff in R
From Zero to Hero - All you need to do serious deep learning stuff in R From Zero to Hero - All you need to do serious deep learning stuff in R
From Zero to Hero - All you need to do serious deep learning stuff in R
 
Declare Your Language: What is a Compiler?
Declare Your Language: What is a Compiler?Declare Your Language: What is a Compiler?
Declare Your Language: What is a Compiler?
 
(1) cpp introducing the_cpp_programming_language
(1) cpp introducing the_cpp_programming_language(1) cpp introducing the_cpp_programming_language
(1) cpp introducing the_cpp_programming_language
 
Batch file programming
Batch file programmingBatch file programming
Batch file programming
 
python PPT Session 1.pptx
python PPT Session 1.pptxpython PPT Session 1.pptx
python PPT Session 1.pptx
 
Introduction to C programming
Introduction to C programmingIntroduction to C programming
Introduction to C programming
 

Kürzlich hochgeladen

Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxleah joy valeriano
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 

Kürzlich hochgeladen (20)

Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 

Using Python

  • 1. Using Python or how to code snake language in windows
  • 3. Python is a common programming language…
  • 4. It is used for a large variety of applications, for example, analytical software.
  • 5. Code import os x = os.getcwd() #Assigns the current directory to x print(x) ------------------------------------------------------------------------------------- Output C:UsersSebastianDownloads A simple Python program looks like above.
  • 7. Code import os x = os.getcwd() #Assigns the current directory to x print(x) ------------------------------------------------------------------------------------- Output C:UsersSebastianDownloads The purples are statements. The import statement tells the computer to grab a prewritten piece of code and implement it easily…
  • 8. Code import os x = os.getcwd() #Assigns the current directory to x print(x) ------------------------------------------------------------------------------------- Output C:UsersSebastianDownloads The greens are modules. Modules are a way to write code so that you can implement it easier in other parts of your code…
  • 9. The reds are variables. The x is here assigned to the value of os.getcwd(). Variables are a way to store data that will be used later, either, for example, for calculations, or for text manipulation… Code import os x = os.getcwd() #Assigns the current directory to x print(x) ------------------------------------------------------------------------------------- Output C:UsersSebastianDownloads
  • 10. Code x = ‘Hello you’ #x is now a string-variable y = 7 #y is now a number-variable print(x) print(y) ------------------------------------------------------------------------------------- Output Hello you 7 Here’s a visual demonstration of different kinds of variable values and how the values are stored to a variable. The ‘Hello you’ is a string, and the 7 is an integer, shortened int…
  • 11. Code import os x = os.getcwd() #Assigns the current directory to x “”” print(x) ------------------------------------------------------------------------------------- Output C:UsersSebastianDownloads The grey are comments. The # represents a single line comment, which is used when there needs to be a quick explanation, such as above. There is also the “””…“”” which is a multiline comment, mostly used to comment away sections of code that isn’t used. The comments does nothing when the program runs…
  • 12. Code import os x = os.getcwd() #Assigns the current directory to x print(x) ------------------------------------------------------------------------------------- Output C:UsersSebastianDownloads And finally, the blues are functions. Functions is a block of organized, reusable code that is used to perform a single, related action. Functions provide better modularity for your application and a high degree of code reusing…
  • 13. Now it’s time to install Python…
  • 14. Start by going to https://www.python.org/downloads/...
  • 15. Then click the download button for the version of Python you want, we are using Python 3.4.* for the code in this presentation…
  • 16. Finally it is just a matter of following the instructions given.
  • 17. Even though Python has a large built in library, it lacks certain modules to ease the code-writing…
  • 18. Therefore, we’ll now guide you through the process of installing more libraries to Python…
  • 19. Start by downloading the library you want to install, we’ll install the wikipedia library in this tutorial…
  • 20. If there is a .exe file to download, download and run it, and it’s installed. Otherwise, download the .gz.tar file and unzip it to the folder where Python is, using e.g. WinRAR… This is what my Python folder looks like.
  • 21. After that it’s time to start the old CMD. When it’s started, navigate to the Python folder, it should look something like the picture above…
  • 22. Now it’s time to install the library. Type in the code shown above in to CMD to start the installation, but remember to type in the name of the library you’re installing instead of wikipedia… Python –m pip install wikipedia
  • 23. That’s it! By Sebastian Grunditz and Samuel Håkansson