• Verkeerd document? Gratis ruilen
  • Geschreven door studenten die geslaagd zijn
  • Direct beschikbaar na je betaling
  • Online lezen of als PDF
Verkopen
Kies je studieland
Kies je taal
Document preview thumbnail
Voorbeeld 3 van de 20 pagina's
Tentamen (uitwerkingen)

Python for IT Automation D522 Quick Study Sheet: Key Concepts & Tips

Document preview thumbnail
Voorbeeld 3 van de 20 pagina's

Python for IT Automation D522 Quick Study Sheet: Key Concepts & Tips

Voorbeeld van de inhoud

Python for IT Automation D522 Quick Study Sheet: Key Concepts & Tips




Python for IT Automation Quick Study Sheet
Common Python topics, examples, and study tips for quick review


This guide focuses on common Python topics students often see in Python for IT Automation, with
simple examples and study tips.



1. Variables and Data Types
name = "Joy" # string
age = 25 # integer
price = 19.99 # float
is_ready = True # Boolean




Common types

Item Description

str text

int whole numbers

float decimal numbers

bool True or False

list ordered, changeable collection (mutable)

tuple ordered, unchangeable collection (immutable)

dict key-value pairs

set unordered, unique values



2. Type Checking and Conversion
x = "5"
print(type(x)) # <class 'str'> This checks the type of data

num = int(x) int(x) converts the string into an interger and then add 2 to it
print(num + 2) # 7 giving you the output of 7




Python for IT Automation D522 Quick Study Sheet: Key Concepts & Tips

,Python for IT Automation D522 Quick Study Sheet: Key Concepts & Tips




Common conversions

Item Description

int("10") takes a string and converts it to an integer

float("3.14") takes a string and converts it to a float

str(25) takes an integer and converts it to a string

True # 0 is False and any non-zero numbers is
bool(1)
True

Takes a string (“abc”) and converts it to a list of
list("abc")
individual characters ['a', 'b', 'c']



3. Lists
fruits = ["apple", "banana", "orange"]
print(fruits[0]) # apple fruits[0] gets the first item
print(len(fruits)) # 3 this will output the number of items in the list

fruits.append("grape") append('grape') adds 'grape' to the end of the list
fruits.remove("banana") remove('banana') deletes 'banana' from the list




Useful list methods
fruits = ["apple", "banana"]


fruits.append("orange") # add one item to the end
print(fruits) # ['apple', 'banana', 'orange']


fruits.remove("banana") # remove by value
print(fruits) # ['apple', 'orange']


fruits.insert(1, "grape") # insert at a specific index
print(fruits) # ['apple', 'grape', 'orange']


print(fruits.pop()) # removes and returns last item
print(fruits) # ['apple', 'grape']


numbers = [4, 2, 7, 1]


numbers.sort() # sorts the list in ascending order
print(numbers) # [1, 2, 4, 7]




2
Downloaded by Morris mwangi Ngigi ()

, Python for IT Automation D522 Quick Study Sheet: Key Concepts & Tips




numbers.reverse() # reverses the current order of the list
print(numbers) # [7, 4, 2, 1]




List method reminders

Item Description

.append(x) adds one item to the end of the list

.remove(x) removes the first matching value

.insert(i, x) inserts item at a specific position

.pop() removes and returns an item

.sort() puts items in order and changes the original list

flips the current order and changes the original
.reverse()
list



Create a new list

This example creates a new list with only even numbers
numbers = [1, 2, 3, 4, 5, 6]


even_numbers = [] creates an empty list

for num in numbers:
if num % 2 == 0: the % symbol means remainder (if the number divides by 2
even_numbers.append(num) with no remainder it is even)


print(even_numbers) # [2, 4, 6] add this item to the end of the list




Accessing an element from a list
fruits = ["apple", "banana", "orange"]


print(fruits[0]) # apple
print(fruits[1]) # banana
print(fruits[2]) # orange




3
Downloaded by Morris mwangi Ngigi ()

Documentinformatie

Geüpload op
30 augustus 2026
Aantal pagina's
20
Geschreven in
2026/2027
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden
$15.49

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
Stuviatlas
3.8
(438)
Verkocht
1893
Volgers
1469
Items
7505
Laatst verkocht
2 weken geleden




Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen