Posts

Showing posts from 2022

Featured Posts

CS50 Python , Nutrition Facts Table

Image
Nutrition Facts: Python Practice for Beginners Nutrition Facts Table for Python Practice Welcome to this comprehensive guide for Python beginners! If you are learning how to work with lists, dictionaries, and loops, this post will help you build practical skills using a real-world example: nutrition facts for fruits. Understanding how to organize and manipulate data is a key part of programming, and this exercise will give you hands-on experience. Below is a sample table of fruits and their calorie values, formatted as a Python list of dictionaries. This structure is ideal for coding exercises, projects, or even building your own nutrition calculator. You can expand this list, add new fruits, or use it as a foundation for more advanced Python tasks. Python List of Dictionaries Example: fruits = [ {'name': 'Apple', 'calories': 130}, {'name': 'Avocado', 'calories': 50}, {'name': 'Banana', 'ca...

Portrait Drawing Video

Image
 Drawing a Portrait of a Sweet Girl Wearing  hijab In this video tutorial  We can see a step by step portrait drawing, or you can say 'portrait building'. Every new drawing is like a new project or like building a house. We start by building the bases, then we add the blocks one by one. You cannot build a house suddenly, and you cannot build a house in the air without a base or blocks. Here, the base of the project is the light lines on which we build the details. If you start with the details directly, be sure that your project will not complete, or it will be a weak project with too many mistakes. Follow the steps, and let me know in the comments if that helped.

Parts of Speech - Pronouns

Image
 What is a Pronoun? Definition of Pronoun: A pronoun is a word that replaces a noun (single word)  or replaces  anything functioning as a noun (noun clause , noun phrase) . Pronouns do the same job of nouns in the sentence. I have a car . It is white. It is 2021 model.      (We used "it" in the second and third sentence to avoid repeating the noun "car".) My daughter's cat's name is " Candy ". She is white and she keeps playing all day long.      (We used "she" to replace "My daughter's cat".) What are Antecedents of Pronouns?  She likes blue color more than red . --> Who is She ? What if we did not mention the noun first? If we started with the pronoun, we will not know what does this pronoun refer to, right? Most of the time, yes, that's why we need to start with nouns and we call them Antecedents . Sometimes we don't need to start with nouns (if you start by "I", then people will know that you...

برج خور - أطول برج في العالم

Image
 برج خور - دبى برج خور - دبى إذا سبقت لك زيارة إمارة دبى الإماراتية ، فبالتأكيد قمت بزيارة "برج خليفة" أطول برج في الإمارات - حتى هذه اللحظة. لكن، يبدو أن برج خليفة,  - بعد أن حمل لقب أطول برج فى الإمارات، بل فى العالم -  يستعد لتسليم لقب أطول برج فى الإمارات إلى رفيقه فى نفس الإمارة - برج خور، أو كما يطلق عليه اسم "البرج",  والذى عند اكتمال بناءه ، سيتجاوز أيضاً برج "طوكيو سكاى ترى" ويسحب منه لقب أطول برج فى العالم.  سبب بناء برج خور عام ٢٠١٦ م أعلنت إمارة دبى الإماراتية عن مشروع بناء برج خور ، وقد كان من المقرر الإنتهاء من البرج فى عام ٢٠٢٢ م ، غير أن جائحة كورونا قد أجلت أعمال البناء. ويرجع السبب الرئيسى فى فكرة هذه البرج إلى ما حققه برج خليفة من نجاح منقطع النظير فى استقطاب أعداد مهولة من السياح لزيارته, مما ساهم فى نمو اقتصادى كبير لإمارة دبى (أغنى مدينة فى الإمارات) على وجه الخصوص , ولدولة الإمارات العربية المتحدة على وجه العموم. أيقنت دبى حكومة الإمارات مبكرا أن النفط لن يكون مصدرا للإقتصاد ولن يدوم طويلا , فقررت الإعتماد على التطوير السياحى وال...

Play Food Catcher | Game

Image
 The Food Catcher Food Catcher - Scratch Welcome to the table. You came here because you are hungry, huh? My table has rules to win . Let's know these rules before you click on the green button. How to Win? 1- Move the bowl right and left using the keyboard right and left arrows to catch the falling food. 2- Try to catch 30 falling foods before 30 seconds pass. 4- If the timer reached 30 seconds before your collect 30 foods score, you lose! Note: This game is more Keyboard friendly than mobile, though it will work with mobile.  Bon Appetite! This game has been made by scratch as a project for Harvard University programming course. Scratch is a free fun way to learn programming fundamentals even for your kids. They will learn programming without knowing that they are actually programming. With Scratch, you can make videos, games, and illustrations for your projects. This game will be upgraded upon requests in the comments, e.x: We can add levels of difficulties, increase or dec...

cs50 Week 2 Problem Set 2 Readability Solution

Image
CS50 Week 2 Problem Set 2 Readability Problem Set 2 - Readability In coding, problems have different ways to get to the solution. Below code is one way. Soon, we will be posting different codes. ** Remember: Try to change some things in the code before submitting it in order to avoid being rejected as Harvard academic honesty. The Solution: #include <cs50.h> #include <stdio.h> #include <string.h> #include <math.h> #include <ctype.h> int main(void) {     // inintiate needed variables     string text = get_string("TEXT: ");     int letters = 0;     int words = 1;     int sentences = 0;     for (int i = 0; i < strlen(text); i++)     {         if (isalpha(text[i]))         {             letters++;         }         else if (text[i] == ' ')         {   ...

English Vocabulary Books

Image
Everyday Real English Conversation Books Enhance your Everyday English Vocabulary English Vocabulary in use In this post, you will find books that help you enhance your vocabulary. These books will walkl you through the best way to earn and remember the new vocabulary. added to that, there are multiple excercixes with answers English Vocabulary in Use Elementary Level (with Answers) Author: Michael McCarthy, Felicity ODell English Vocabulary in Use Pre-Intermediate & Intermediate Author: Stuart Redman "Test" - English Vocabulary in Use Pre-Intermediate & Intermediate Author: Stuart Redman & Ruth Gairns English Vocabulary in Use A...

How to Open a Folder in VSC with CMD

Image
 Open a Folder in Visual Studio Code with CMD VSC If you don't have the the right click option open with visual studio code, no worries, you can do that with command prompt. Here's how: From windows explorer, open/migrate to the folder/directory which you want to work on. click in the folder/directory path which will highlight the path to the folder ex. C:\Users\User\Desktop\projects While the folder is highlighted, type cmd which will open the command prompt with the file path Open folder with Command Prompt In the command prompt type ( code . ) without the brackets. The folder you are in will open with Visual Studio Code. Now, you can work on the folder through Visual Studio Code, like creating a new file, copying or deleting a file. Other topics of Interest: How to show flames in Visual Studio Code DoodleMaker Vs Doodly Visual Studio Code terminal drop down list How to download a YouTube Video

A Holding Company?

Image
 What is a Holding Company? Definition of a "Holding Company": As per Merriam Webster Dictionary, a holding company is a company whose main business is owning  more than half of another company's (subsidiary) stock. As per Dictionary.com, it's a company that controls other companies through stock ownership but that usually does not engage directly in their productive operations . So, we can understand that the holding company is a "corporation or limited liability company (LLC) which doesn't manufacture or sell any products or  services or conduct any business operations. Holding companies only hold the controlling stock in other companies (As per the definition from investopedia). How does the Holding Company Operate? The subsidiary companies have their own management who run the business directly while management of the holding company monitors and foresees the policies and measure the performance of the subsidiary companies' management. Accordingly, t...

None, is it Singular or Plural?

Image
 "None" .. How to deal with it? Does None mean Nothing? H ave you ever wondered whether to choose "none is" or "none are"? Maybe you would like to say "It's none of your business? What is "None"? "None" as a word is defined as "an indefinite Pronoun", and it means "not one", "not any", or "nothing". It can be used as "an adverb", and it means "not at all". None .. Singular or Plural? The final result of a debate between grammarians is that "none" can be both Singular and Plural depending on what the speaker means. This is the general but I will help you differentiate: "None" as an indefinite Pronoun should agree with the noun / Pronoun to which it refers. Plural None of your words ARE carefully chosen. ("words" is plural, so it takes a plural verb) None of my friends ARE going to the movies . Three people WERE in the bar. None of them w...

Test Your Knowledge About Proverbs

Image
test your knowledge about proverbs  What is a Proverb? Proverb Definition: Proverbs are a collection of wise sayings that provides wisdom, advice, or a truth about life. Why proverbs are important? Knowing Proberbs or learning them is very important for multiple reasons: This helps you undersand their meaning when they come up in a convrsation. Undersanding the meaning helps you be more familiar with the culture of the language. Enrich your vocabulary and enhance your learning curve. That would sound hard in the beginning, but enjoying when you start knowing about proverbs, specially when they rythem sometimes. That being said, you have one of two options: Solve below Quest

How to show flames in Visual Studio Code

Image
 Power Mode power mode What is Power Mode? Power Mode is an awesome extension in Visual Studio Code (VSC) .  How to use Power Mode Extension? When you have Visual Studio Code Open, click on Extensions icon on the left (Ctrl+Shift+X). On top, in Search Extensions in Marketplace , write Power Mode Click on the extension with the icon shown in the tutorial below Click on install After the extension is installed, on the right under you will find a cog, click on it and then choose Extension Settings The first option "Powermode: Enabled will be unticked by default, choose it to activate the extension (tick the square) in Powermode: Presets, choose the preset you like The rest of the options are up to you to control how the preset will look like (timing, size, counter, etc.) Happy Coding

How to use Python Virtual Environment - venv

Image
 Virtual Environment python virtual environment -venv What is Virtual Environment? Virtual Environment - we will call it (Virtualenv) - is an isolated environment where you can download packages away from python system packages. This article is about venv which is a built-in python package, and for windows users. How to simply use virtual environment? * To create a virtual Environment folder: >> python -m venv folder_name -> It's a good practice/common convention to add venv to the folder name to differentiate it from other folders. OR: >> python -m venv Exsisting_folder_name\new_venv_folder_name * To activate/move inside the Virual Envirnment folder: >> folder_name\Scripts\activate.bat OR: >> Exsisting_folder_name\new_venv_folder_name\Scripts\activate.bat - You will notice the name of the Virtual Environment folder in the beginning of the folder path.  - Now, you're working on an isolated folder which has only the default python global version ins...

Parts of Speech - Verbs

Image
What is a Verb? Parts of Speech - Verbs A Verb (v) is a word that shows action, occurrence, or state of being. The Verb describes what the subject (Noun) is doing. I run everyday because I love to be in a good shape. She works at a factory My car needs an oil change. The wealthy man bought a mansion. He apologized to her many times. How many types of Verbs and what are they? There are 11 common types of verbs - some people say they are 7. The main 7 Types of Verbs: 1- Action Verbs: Words that describe actions. Action verbs can also be called Dynamic or Physical Verbs. Action Verbs Examples of Action Verbs: work - chase - run - play - help - swim - jump - write - ignore - try Please open the door. I always laugh when I hear his jokes. 2- Stative Verbs: Stative or state verbs are words which describe thoughts, emotions, feelings, opinions, senses, possessions, perceptions, measurement,.. . stative verbs in English Examples of Stative Verbs: want - own - have - be - need - love 🔔...