SlideShare a Scribd company logo
1 of 4
PYTHON SCRIPTS
Kenway
import random
WORDS = ("python", "jumble", "easy", "difficult", "answer" "xylophone")
word = random.choice (WORDS)
correct = word
jumble = ""
while word:
position = random.randrange (len(word) )
jumble += word[position]
word = word[:position] + word[(position + 1):]
print(
"""
welcome to word jumble!
Unsramble the letters to make a word.
(press the enter key at the prompt to quit.)
"""
)
print("The jumble is:", jumble)
guess = input ("nYour Guess: ")
while guess != correct and guess != "":
print("Sorry, that's not it.")
guess = input ("your guess: ")
print ("Thanks for playing.“)

WHILE LOOP
# Mood Computer
# Demonstrates the elif clause
import random
print("I sense your energy. Your true emotions are coming across my screen.")
print("You are..")
mood = random.randint(1, 3)
if mood == 1:
# happy
print ( 
""" :D """)
elif mood == 2:
# neutral
print ( 
""" -_- """)
elif mood == 3:
# sad
print ( 
""" :( """)
else:
print("Illegal mood value! (You must be in a really bad mood).")
print ("....today")
input("nnPress the enter key to exit.")

IF LOOP
message = input("Enter Message: ")
print("nThe length of your message is:", len(message) )
print("n the most common letter in the english language is, 'e', ")
if "e" in message:
print("is in your message.")
else:
print("is not in your message.")

IF ELSE LOOP

More Related Content

What's hot

Vuvuzela flow and wireframes
Vuvuzela   flow and wireframesVuvuzela   flow and wireframes
Vuvuzela flow and wireframesPeter Blom
 
Elliot Black 3D game Workflow
Elliot Black 3D game WorkflowElliot Black 3D game Workflow
Elliot Black 3D game WorkflowElliotBlack
 
Ig1 task 2 analysis work sheet111
Ig1 task 2 analysis work sheet111 Ig1 task 2 analysis work sheet111
Ig1 task 2 analysis work sheet111 kieranowens1997
 
Sound game maker explanations
Sound game maker explanationsSound game maker explanations
Sound game maker explanationseduriez
 
Task 11 programming sounds into my game
Task 11 programming sounds into my gameTask 11 programming sounds into my game
Task 11 programming sounds into my gameBenCom1
 
Sound programme process
Sound programme processSound programme process
Sound programme processhalo4robo
 
game project-research
game project-researchgame project-research
game project-researchaliceleeman
 
Website comparison
Website comparisonWebsite comparison
Website comparisonT114918
 
Shot over kill terrorist
Shot over kill terroristShot over kill terrorist
Shot over kill terroristdavislucille
 
Instructions pc virtual
Instructions pc virtualInstructions pc virtual
Instructions pc virtualyospina34
 

What's hot (16)

Vuvuzela flow and wireframes
Vuvuzela   flow and wireframesVuvuzela   flow and wireframes
Vuvuzela flow and wireframes
 
Block wars 3 d
Block wars 3 dBlock wars 3 d
Block wars 3 d
 
Elliot Black 3D game Workflow
Elliot Black 3D game WorkflowElliot Black 3D game Workflow
Elliot Black 3D game Workflow
 
Ig1 task 2 analysis work sheet111
Ig1 task 2 analysis work sheet111 Ig1 task 2 analysis work sheet111
Ig1 task 2 analysis work sheet111
 
Sound game maker explanations
Sound game maker explanationsSound game maker explanations
Sound game maker explanations
 
1. initial plans(2)
1. initial plans(2)1. initial plans(2)
1. initial plans(2)
 
Game interface
Game interfaceGame interface
Game interface
 
Task 11 programming sounds into my game
Task 11 programming sounds into my gameTask 11 programming sounds into my game
Task 11 programming sounds into my game
 
Sound programme process
Sound programme processSound programme process
Sound programme process
 
game project-research
game project-researchgame project-research
game project-research
 
Website comparison
Website comparisonWebsite comparison
Website comparison
 
Info
InfoInfo
Info
 
Print screen
Print screenPrint screen
Print screen
 
Assignment C
Assignment C Assignment C
Assignment C
 
Shot over kill terrorist
Shot over kill terroristShot over kill terrorist
Shot over kill terrorist
 
Instructions pc virtual
Instructions pc virtualInstructions pc virtual
Instructions pc virtual
 

Viewers also liked

Application form a zse
Application form a zseApplication form a zse
Application form a zsePeter Sevce
 
Ekonomický týždenník Poštovej banky - 17. týždeň, 2015
Ekonomický týždenník Poštovej banky - 17. týždeň, 2015Ekonomický týždenník Poštovej banky - 17. týždeň, 2015
Ekonomický týždenník Poštovej banky - 17. týždeň, 2015pabk
 
Ekonomický týždenník Poštovej banky - 14. týždeň, 2015
Ekonomický týždenník Poštovej banky - 14. týždeň, 2015Ekonomický týždenník Poštovej banky - 14. týždeň, 2015
Ekonomický týždenník Poštovej banky - 14. týždeň, 2015pabk
 
Six step for partners
Six step for partnersSix step for partners
Six step for partnersJohn Hemphill
 
Ekonomický týždenník Poštovej banky - 24. týždeň
Ekonomický týždenník Poštovej banky - 24. týždeňEkonomický týždenník Poštovej banky - 24. týždeň
Ekonomický týždenník Poštovej banky - 24. týždeňpabk
 
Life & blood of entrepreneurship
Life & blood of entrepreneurshipLife & blood of entrepreneurship
Life & blood of entrepreneurshipRamesh Kandikonda
 
Bewakoofiyaan Movie Photos
Bewakoofiyaan Movie PhotosBewakoofiyaan Movie Photos
Bewakoofiyaan Movie PhotosVIJAY NEWS
 
Ekonomický týždenník Poštovej banky - 11. týždeň, 2015
Ekonomický týždenník Poštovej banky - 11. týždeň, 2015Ekonomický týždenník Poštovej banky - 11. týždeň, 2015
Ekonomický týždenník Poštovej banky - 11. týždeň, 2015pabk
 
Pankaj jain senior_manager_(development_&_support)_11.5_yr_mba_iit_b_tech_iit
Pankaj jain senior_manager_(development_&_support)_11.5_yr_mba_iit_b_tech_iitPankaj jain senior_manager_(development_&_support)_11.5_yr_mba_iit_b_tech_iit
Pankaj jain senior_manager_(development_&_support)_11.5_yr_mba_iit_b_tech_iitPANKAJ JAIN
 
Stvorimo bolji internet zajedno
Stvorimo bolji internet zajednoStvorimo bolji internet zajedno
Stvorimo bolji internet zajednoNatasa_007
 
Ekonomický týždenník 11. týždeň 2014
Ekonomický týždenník 11. týždeň 2014Ekonomický týždenník 11. týždeň 2014
Ekonomický týždenník 11. týždeň 2014pabk
 
итоговая презентация
итоговая презентацияитоговая презентация
итоговая презентацияJenya_S
 
"Re-Thinking Social Inequality" - Documentation Herrenhausen Conference
"Re-Thinking Social Inequality" - Documentation Herrenhausen Conference"Re-Thinking Social Inequality" - Documentation Herrenhausen Conference
"Re-Thinking Social Inequality" - Documentation Herrenhausen ConferenceVolkswagenStiftung
 
Hindustan Newsprint Limited : Qualified candidates in different Trades/Discip...
Hindustan Newsprint Limited : Qualified candidates in different Trades/Discip...Hindustan Newsprint Limited : Qualified candidates in different Trades/Discip...
Hindustan Newsprint Limited : Qualified candidates in different Trades/Discip...VIJAY NEWS
 
Презентация для родительского собрания
Презентация для родительского собранияПрезентация для родительского собрания
Презентация для родительского собранияMasha Senti
 

Viewers also liked (20)

Application form a zse
Application form a zseApplication form a zse
Application form a zse
 
Ekonomický týždenník Poštovej banky - 17. týždeň, 2015
Ekonomický týždenník Poštovej banky - 17. týždeň, 2015Ekonomický týždenník Poštovej banky - 17. týždeň, 2015
Ekonomický týždenník Poštovej banky - 17. týždeň, 2015
 
Ekonomický týždenník Poštovej banky - 14. týždeň, 2015
Ekonomický týždenník Poštovej banky - 14. týždeň, 2015Ekonomický týždenník Poštovej banky - 14. týždeň, 2015
Ekonomický týždenník Poštovej banky - 14. týždeň, 2015
 
Trabajo
TrabajoTrabajo
Trabajo
 
10.hafta sunu
10.hafta sunu10.hafta sunu
10.hafta sunu
 
Six step for partners
Six step for partnersSix step for partners
Six step for partners
 
Ekonomický týždenník Poštovej banky - 24. týždeň
Ekonomický týždenník Poštovej banky - 24. týždeňEkonomický týždenník Poštovej banky - 24. týždeň
Ekonomický týždenník Poštovej banky - 24. týždeň
 
Life & blood of entrepreneurship
Life & blood of entrepreneurshipLife & blood of entrepreneurship
Life & blood of entrepreneurship
 
Bewakoofiyaan Movie Photos
Bewakoofiyaan Movie PhotosBewakoofiyaan Movie Photos
Bewakoofiyaan Movie Photos
 
Ekonomický týždenník Poštovej banky - 11. týždeň, 2015
Ekonomický týždenník Poštovej banky - 11. týždeň, 2015Ekonomický týždenník Poštovej banky - 11. týždeň, 2015
Ekonomický týždenník Poštovej banky - 11. týždeň, 2015
 
Pankaj jain senior_manager_(development_&_support)_11.5_yr_mba_iit_b_tech_iit
Pankaj jain senior_manager_(development_&_support)_11.5_yr_mba_iit_b_tech_iitPankaj jain senior_manager_(development_&_support)_11.5_yr_mba_iit_b_tech_iit
Pankaj jain senior_manager_(development_&_support)_11.5_yr_mba_iit_b_tech_iit
 
Stvorimo bolji internet zajedno
Stvorimo bolji internet zajednoStvorimo bolji internet zajedno
Stvorimo bolji internet zajedno
 
ИБ эпохи перемен
ИБ эпохи переменИБ эпохи перемен
ИБ эпохи перемен
 
Ekonomický týždenník 11. týždeň 2014
Ekonomický týždenník 11. týždeň 2014Ekonomický týždenník 11. týždeň 2014
Ekonomický týždenník 11. týždeň 2014
 
итоговая презентация
итоговая презентацияитоговая презентация
итоговая презентация
 
"Re-Thinking Social Inequality" - Documentation Herrenhausen Conference
"Re-Thinking Social Inequality" - Documentation Herrenhausen Conference"Re-Thinking Social Inequality" - Documentation Herrenhausen Conference
"Re-Thinking Social Inequality" - Documentation Herrenhausen Conference
 
Nimcet 2014
Nimcet 2014Nimcet 2014
Nimcet 2014
 
Hindustan Newsprint Limited : Qualified candidates in different Trades/Discip...
Hindustan Newsprint Limited : Qualified candidates in different Trades/Discip...Hindustan Newsprint Limited : Qualified candidates in different Trades/Discip...
Hindustan Newsprint Limited : Qualified candidates in different Trades/Discip...
 
Taller de cake pops
Taller de cake popsTaller de cake pops
Taller de cake pops
 
Презентация для родительского собрания
Презентация для родительского собранияПрезентация для родительского собрания
Презентация для родительского собрания
 

Recently uploaded

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 

Recently uploaded (20)

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 

Python scripts

  • 2. import random WORDS = ("python", "jumble", "easy", "difficult", "answer" "xylophone") word = random.choice (WORDS) correct = word jumble = "" while word: position = random.randrange (len(word) ) jumble += word[position] word = word[:position] + word[(position + 1):] print( """ welcome to word jumble! Unsramble the letters to make a word. (press the enter key at the prompt to quit.) """ ) print("The jumble is:", jumble) guess = input ("nYour Guess: ") while guess != correct and guess != "": print("Sorry, that's not it.") guess = input ("your guess: ") print ("Thanks for playing.“) WHILE LOOP
  • 3. # Mood Computer # Demonstrates the elif clause import random print("I sense your energy. Your true emotions are coming across my screen.") print("You are..") mood = random.randint(1, 3) if mood == 1: # happy print ( """ :D """) elif mood == 2: # neutral print ( """ -_- """) elif mood == 3: # sad print ( """ :( """) else: print("Illegal mood value! (You must be in a really bad mood).") print ("....today") input("nnPress the enter key to exit.") IF LOOP
  • 4. message = input("Enter Message: ") print("nThe length of your message is:", len(message) ) print("n the most common letter in the english language is, 'e', ") if "e" in message: print("is in your message.") else: print("is not in your message.") IF ELSE LOOP