Posts

Showing posts from 2021

Useful Sites for English Language Learners

Image
Sites to Help You Learn and Practice English Using paperback dictionaries The world of personal computers, laptops, smart phones and internet has stepped into our journey and has become a part of it whether we like it or not. A few people - me included - are still using paperback dictionaries and books in general as they hate reading from a screen for long.  As we learn English language, we are faced by hard or new vocabulary, need to paraphrase a sentence (rewrite it in different words), write some examples on certain vocabulary, search for synonyms, etc. That said, let's get to know some useful sites to help you advance in learning and maybe do your homework. 1- Youglish Youglish Youglish comes on top of the list for it's amazing tools and options for not just listening, but many other things.  You first choose the language and you will get the accents options. If English, you get All accent...

The Grammar of "only"

Image
 How to use "only" and why it's versatile? The "only" game Versatile means "adaptable and flexible", which means it can be used in different roles : 1- Only as "an adverb": 👉 It can be replaced with "just" It's only an idea. This phone is only available in Japan. She was only 18 when she had her first child. Only a few hundred houses survived the hurricane without any damage. I only hope we can finish this on time. 2- Only as "an adjective": 👉 As an adjective, it comes before the noun. This is the only letter my father ever wrote to me. He was the only person in the room. I was an only child. Being healthy is the only thing that is important to me. You are the only person who can help me. Is that your only copy of the book? He was the only one who could read in the village. That was the only large t-shirt left in that color. There were only four United fans in the room. Not:  He was the only who could read …   ❌ 3- O...

The Secrets - 20 Interesting Secrets Revealed

Image
20 Interesting Secrets You Need to Know 20 Interesting Secrets You Need to Know Our dearest reader who loves to know Since you are here, it is our utmost pleasure to see you and help you both with knowing and enjoying. This is what we call "The Utmost Benefit", to enjoy while learning. With no further details, let's dive in into 20 interesting world secrets revealed. Hope you enjoy knowing  and revealing #thesecrets . The Moon Is the moon a planet or a star? The Moon is neither a star or a planet, it is Earth's only natural satellite. Thought to have formed 4.5 billion years ago, scientists believe it is made from debris left from an impact between Earth and a large planet. It orbits our planet around once every four weeks, with one side of the Moon always facing Earth. Did the number 4.5 billion years flash any memory in your head? What is the book that the Statue of Liberty is holding? Statue of Liberty Statue of Liberty, formally Liberty Enlightening the World, is ...

Finance | Assets - Meaning and Types

Image
 What is an Asset? what are the Assets Types? What is an asset in business ? What is an Asset? Assets are the items your company owns that can provide future economic benefit. What are the types of Assets? Assets are classified based on liquidity. Liquidity means how quickly an asset can be turned into cash. 1- Fixed Assets - illiquid (non-liquid) assets:  These are assets owned by the company but need longer than a year to be converted to cash. They include company cars, real estate, machinery, coverage towers for telecom companies, buildings, furniture, office equipment, etc. They contribute to the income, but they are not consumed in the income generating process. 2- Liquid Assets: Liquid assets are those assets that can be turned into cash and be used immediately to pay liabilities in your balance sheet. Common liquid assets include: cash, certificates of deposit, stocks, precious metals (and they can be both liquid and fixed based on how you store them and their ava...

Python 4.3.1.10 LAB: Converting fuel consumption

Image
 Python 4.3.1.10 LAB: Converting fuel consumption 4.3.1.10 LAB Objectives improving the student's skills in defining, using and testing functions. Scenario A car's fuel consumption may be expressed in many different ways. For example, in Europe, it is shown as the amount of fuel consumed per 100 kilometers. In the USA, it is shown as the number of miles traveled by a car using one gallon of fuel. Your task is to write a pair of functions converting l/100km into mpg " mile per gallon ", and vice versa . Sandbox The functions: are named liters_100km_to_miles_gallon and miles_gallon_to_liters_100km respectively ; take one argument (the value corresponding to their names) Complete the code in the editor. Run your code and check whether your output is the same as ours. Here is some information to help you: 1 American mile = 1609.344 metres; 1 mile = "1.60934" meters 1 American gallon = 3.785411784 litres. Expected output 60.31143162393162 31.36194444444444 23....

Python 4.3.1.9 LAB: Prime numbers - how to find them

Image
  Python 4.3.1.9 LAB Objectives familiarizing the student with classic notions and algorithms; improving the student's skills in defining and using functions. Scenario A natural number is prime if it is greater than 1 and has no divisors other than 1 and itself. Complicated? Not at all. For example, 8 isn't a prime number, as you can divide it by 2 and 4 (we can't use divisors equal to 1 and 8, as the definition prohibits this). On the other hand, 7 is a prime number, as we can't find any legal divisors for it. Your task is to write a function checking whether a number is prime or not. The function: is called is_prime ; takes one argument (the value to check) returns True if the argument is a prime number, and False otherwise. Hint: try to divide the argument by all subsequent values ( starting from 2 ) and check the remainder - if it's zero , your number cannot be a prime ; think carefully about when you should stop the process . If you need to know the square ro...

Python 4.3.1.8 LAB: Day of the year: writing and using your own functions

Image
 Day of the year: writing and using your own functions Day of the year: writing and using your own functions Prerequisites LAB 4.3.1.6 LAB 4.3.1.7 Objectives Familiarize the student with: projecting and writing parameterized functions; utilizing the return statement; building a set of utility functions; utilizing the student's own functions. Scenario Your task is to write and test a function which takes three arguments (a year, a month, and a day of the month) and returns the corresponding day of the year , or returns None if any of the arguments is invalid. Use the previously written and tested functions. Add some test cases to the code. This test is only a beginning. Stoooooooop .. we are here to real the REAL PYTHON, not this SILLY COURSE Dear learner  .. if you reached here, that means you'd have had enough of this boring course already😏. Let's learn python the right way, not the old school way. Solution Code: def is_leap_year ( year ): # LAB 4.3.1.6 A leap year ...

Python 4.3.1.7 LAB: How many days: writing and using your own functions

Image
writing and using your own functions writing and using your own functions Prerequisites LAB 4.3.1.6 Objectives Familiarize the student with: projecting and writing parameterized functions; utilizing the return statement; utilizing the student's own functions. Scenario Your task is to write and test a function which takes two arguments (a year and a month ) and returns the number of days for the given month/year pair (while only February is sensitive to the year value , your function should be universal). The initial part of the function is ready. Now, convince the function to return None if its arguments don't make sense.  What is needed Of course, you can (and should) use the previously written and tested function (LAB 4.3.1.6). It may be very helpful. We encourage you to use a list filled with the months' lengths . You can create it inside the function - this trick will significantly shorten the code. We've prepared a testing code. Expand it to include more test ca...

Python 4.3.1.6 LAB: A leap year: writing your own functions

Image
If you're taking PCAP - Programming Essentials In Python , you may have encountered this question  4.3.1.6 LAB: A leap year: writing your own functions Objectives Familiarize the student with: projecting and writing parameterized functions; utilizing the return statement; testing the functions. Scenario Your task is to write and test a function which takes one argument (a year) and returns True if the year is a leap year, or False otherwise. The seed of the function is already sown in the skeleton code in the editor. Note: we've also prepared a short testing code, which you can use to test your function. The code uses two lists - one with the test data, and the other containing the expected results. The code will tell you if any of your results are invalid. Important to know first: Normal year is 365 days (actually they're 356.25 days as per Nasa) Leap year is 366 days . Which means, leap year has an additional day added in February which makes it 29 days. A leap year occ...