Practity Blog
428 FOLLOWERS
The Practity Blog offers Tips, News, and Guides on Python and Excel-related topics. Discover interesting, well-researched articles for Python learners and Excel students from Practity, an online resource of real-life practice projects of Python for beginners, intermediate and advanced students focused on specific subjects and libraries.
Practity Blog
2w ago
How Can I Practice Excel at Home?
In today’s data-driven business landscape, proficiency in Microsoft Excel has become an essential skill. Whether you’re a student, a professional, or an aspiring analyst, honing your Excel expertise can open doors to countless opportunities. Fortunately, the answer is yes, you can practice Excel at home with the right approach, you can practice and enhance your Excel skills from the comfort of your own home.
Create a Structured Learning Plan
Developing a comprehensive learning plan is the first step towards mastering Excel. Begin identifying your curren ..read more
Practity Blog
3w ago
Amicable Pairs with Python Project to Learn Python
Amicable numbers, also known as an amicable pair, are two different numbers such that the sum of the proper divisors of each number is equal to the other number. In other words, if the sum of the proper divisors of one number equals the other number, and vice versa, then the two numbers are considered an amicable pair.
For example, the smallest pair of amicable numbers is (220, 284). The proper divisors of 220 are 1, 2, 4, 5, 10, 11, 20, 22, 44, 55, and 110, and their sum is 284. The proper divisors of 284 are 1, 2, 4, 71, and 142, and their s ..read more
Practity Blog
3w ago
Python Class Challenge
Code a Python class named “submarine” to control the navigation of a submarine.
Create an attribute named “depth” that saves the current meters under water of the submarine. Use a property to set the depth attribute and make it hidden.
Add a method named “rise” to ascend to a passed depth change.
Add an attribute named “rise_count” that saves the number of ascents the submarine has done.
Add a method named “course” that returns the submarine current depth.
Add a method named “dive” that makes the submarine to sink to a passed depth change.
Steps
Define the  ..read more
Practity Blog
3w ago
New Alphabet Sort Challenge
Given a new alphabet of 26 letters with no duplicates and arranged in the following order:
ZRSTHIGMAUNOQEDPCKJYFWLVBX
Write a Python program that sorts the words of a given sentence based on this new alphabet order. The program should print the words of the next sentence, separated by spaces, in the new order using the first letter of each word.
“Python uses whitespace indentation, rather than curly brackets or keywords”
Steps
Define the new alphabet: Create a dictionary where each letter in the new alphabet corresponds to its position in the alphabet.
Split ..read more
Practity Blog
3w ago
Blackjack Simulator Python Game project
Blackjack is one of the most popular card games played in Casinos worldwide. The game is also known as 21 because the primary objective is to reach a hand value of 21 or as close to it as possible without exceeding it.
The goal of this Python game project is to code a simplified version of blackjack. You must write a program to check the winner of blackjack.
The input of the program will be:
1) Number and name of players. The program will prompt the user to enter the number and name of the players. For this project assume there are always less than 4.
2 ..read more
Practity Blog
1M ago
Create Data Table Project Python Data Problem
Given the following sales data (EUR) of 5 shops online during the first half of the year:
Sales in January of all shops
[‘25000’, ‘89500’, ‘63000’, ‘45000’, ‘2600’, ‘120’]
Sales in February of all shops
[‘874000’, ‘895000’, ‘412569’, ‘963258’, ‘741258’, ‘456789’]
Sales in March of all shops
[‘2500’, ‘84500’, ‘68000’, ‘41000’, ‘2900’, ‘160’]
Sales in April of all shops
[‘2890’, ‘840’, ‘680’, ‘410’, ‘290’, ’45’]
Sales in May of all shops
[’12’, ’80’, ’68’, ’42’, ’29’, ’15’]
Write a Python program that displays the data as a table. The column ..read more
Practity Blog
1M ago
Zig Zag Message Encryption
Write a Python program to encrypt a message with the rail-fence method. The program will ask the user to input the message to hide and print out the encoded output,
This method consists of writing the text as a zig-zag with a given height and extract the ciphertext which is the concatenation of the 3 “words” created after applying the method. For this Python coding project, use a height of 3 lines.
For example, if the message input by the user is “helloworld”, the zig zag must produce:
h o l
e l w r d
l o
And the the ciphertext will be “holelwrdlo”
Source ..read more
Practity Blog
1M ago
How Do I Know If I am proficient in Python?
Python, with its simplicity and versatility, has become one of the most popular programming languages in the world. Whether you’re a beginner or an experienced developer, assessing your proficiency in Python is crucial for personal and professional growth.
How to determine your mastery of Python?
Assessing your own proficiency in Python is an essential step towards personal and professional growth. When you evaluate your skills, you can identify areas for improvement and set goals to further enhance your expertise. Consider the following strat ..read more
Practity Blog
1M ago
Fractions Project with Python
Write a Python program that performs addition and subtraction operations on fractions. The program should specifically calculate the following operations:
1. Addition: 9/7 + 8/6.
2. Subtraction: 160/4 – 65/15
Ensure that your program does not use any external libraries for the calculations. Additionally, make sure to print out the fractions involved in each calculation, along with the corresponding result.
Steps
Define a function to find the greatest common divisor (GCD) and the least common multiple (LCM) of two numbers. You can use the Euclidean algorithm ..read more
Practity Blog
1M ago
Shopping List Program
Assume you’re given 5 EUR to buy vegetables for the week in the supermarket. The unit prices in cents are the following:
Tomato: 50,
Onion: 100,
Salad: 129,
Garlic: 45,
Pepper: 155,
Cucumber: 350
Write a Python program that prints out the combination of vegetables you can buy with the 5 EUR exactly. The program should display the vegetable and its price.
1 EUR corresponds to 100 cents.
Steps
Define the unit prices of the vegetables in cents.
Calculate the budget in cents (5 EUR * 100).
Create a list of tuples where each tuple represents a vegetable and its price ..read more