0
0
Cybersecurityknowledge~30 mins

Malware types (virus, worm, trojan, ransomware) in Cybersecurity - Mini Project: Build & Apply

Choose your learning style9 modes available
Understanding Malware Types: Virus, Worm, Trojan, Ransomware
📖 Scenario: You work in a small company's IT department. Your manager asked you to prepare a simple report that lists common malware types and their key characteristics. This will help the team recognize and prevent malware attacks.
🎯 Goal: Create a structured list of malware types with their descriptions and an example of how each one spreads or affects computers.
📋 What You'll Learn
Create a dictionary called malware_types with four keys: 'Virus', 'Worm', 'Trojan', and 'Ransomware'.
Add a variable called example_spread that holds a string describing how malware spreads or acts.
Use a for loop with variables malware and info to iterate over malware_types.items().
Add a final dictionary called malware_report that combines malware_types and example_spread for each malware type.
💡 Why This Matters
🌍 Real World
IT professionals and cybersecurity learners use this knowledge to identify malware threats and educate users on how malware spreads.
💼 Career
Understanding malware types is essential for roles like IT support, cybersecurity analyst, and network administrator to protect systems and respond to attacks.
Progress0 / 4 steps
1
Create the malware types dictionary
Create a dictionary called malware_types with these exact entries: 'Virus' with value 'Needs a host file to spread', 'Worm' with value 'Spreads itself over networks', 'Trojan' with value 'Disguises as legitimate software', and 'Ransomware' with value 'Locks files and demands payment'.
Cybersecurity
Need a hint?

Use curly braces {} to create the dictionary and separate each key-value pair with a comma.

2
Add example spread descriptions
Create a dictionary called example_spread with these exact entries: 'Virus' with value 'Attaches to executable files', 'Worm' with value 'Uses email to spread', 'Trojan' with value 'Hidden in free software', and 'Ransomware' with value 'Sent via phishing emails'.
Cybersecurity
Need a hint?

Use a dictionary similar to malware_types but with the example spread descriptions.

3
Loop over malware types and example spreads
Use a for loop with variables malware and info to iterate over malware_types.items(). Inside the loop, create a new dictionary called combined_info that stores 'Description' as info and 'Spread' as the matching value from example_spread for the current malware.
Cybersecurity
Need a hint?

Use for malware, info in malware_types.items(): and create combined_info inside the loop with keys 'Description' and 'Spread'.

4
Create the final malware report dictionary
Create an empty dictionary called malware_report before the loop. Inside the for loop, add each combined_info dictionary to malware_report using the current malware as the key.
Cybersecurity
Need a hint?

Create malware_report = {} before the loop and add each combined_info inside the loop using malware_report[malware] = combined_info.