<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Almuhannad_01</title>
    <description>The latest articles on DEV Community by Almuhannad_01 (@almuhannad1).</description>
    <link>https://dev.to/almuhannad1</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F763654%2Fedf0c4ce-f68c-4e0e-b41b-982a21300ec5.jpg</url>
      <title>DEV Community: Almuhannad_01</title>
      <link>https://dev.to/almuhannad1</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/almuhannad1"/>
    <language>en</language>
    <item>
      <title>How can I build a time that changes every second on React.js?!</title>
      <dc:creator>Almuhannad_01</dc:creator>
      <pubDate>Sat, 03 Sep 2022 11:11:21 +0000</pubDate>
      <link>https://dev.to/almuhannad1/how-can-build-time-to-update-every-second-in-reactjs-m87</link>
      <guid>https://dev.to/almuhannad1/how-can-build-time-to-update-every-second-in-reactjs-m87</guid>
      <description>&lt;p&gt;--&amp;gt; The technicals which will use in this program &lt;strong&gt;(React.js, React Hooks - useState).&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;The program..&lt;br&gt;
1) add:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;import React, {useState} from "react";&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;2) add function which name the same for the file e.g// App&lt;/p&gt;

&lt;p&gt;&lt;code&gt;function App() {&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;setInterval(sayHi, 1000)&lt;/strong&gt; --&amp;gt; This function prints sayHi every second, but you will add &lt;code&gt;setInterval(updatetime, 1000);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;const now = new Date();  --&amp;gt; This is the object for the Date. For example// you can get the hour when you write const now = new Date ().getHours();, but here you want full-time (( hour: min: sec AM/PM )) for that, will use:&lt;br&gt;
&lt;code&gt;const now = new Date().toLocaleTimeString();&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;3) add hooks:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

const [time,setTime] = useState(now);


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;4) update function time:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

function updatetime() {
    const newtime = new Date().toLocaleTimeString();
    setTime(newtime);
  }


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;5) Program output to the user:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

return(
    &amp;lt;div&amp;gt;
      &amp;lt;h1&amp;gt;{time}&amp;lt;/h1&amp;gt;
    &amp;lt;/div&amp;gt;
);


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Final file will be 🎈:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F78oq804z6oqdr6bw33ap.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F78oq804z6oqdr6bw33ap.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkhb8eoegei8mj8py70eq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkhb8eoegei8mj8py70eq.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;😍&lt;br&gt;
Thank you.. &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>vscode</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Basic concepts of programming</title>
      <dc:creator>Almuhannad_01</dc:creator>
      <pubDate>Sun, 28 Nov 2021 11:53:57 +0000</pubDate>
      <link>https://dev.to/almuhannad1/basic-concepts-of-programming-1h4j</link>
      <guid>https://dev.to/almuhannad1/basic-concepts-of-programming-1h4j</guid>
      <description>&lt;p&gt;Basic concepts of programming:&lt;/p&gt;

&lt;p&gt;. Program: A Program is a set of instructions written in a Programming language for solving a problem. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Types of Programming Languages: There are two types of Programming &lt;br&gt;
languages.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Low level Languages (Examples: Machine language and Assembly language) &lt;/li&gt;
&lt;li&gt;High level Languages (Examples: C, C++, C#, Java, Perl, Python etc.)&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;p&gt;. Machine Language: Machine language programs consist of 0s and 1s.&lt;br&gt;
For example: 00111011 11011111 10110110&lt;br&gt;
They are machine dependent. &lt;br&gt;
It is difficult for us to write programs in machine language.&lt;/p&gt;

&lt;p&gt;. Assembly language: Assembly language programs are made up of mnemonics or symbols. &lt;br&gt;
For example, ADD A, B. We cannot use operator symbol like + for addition.&lt;br&gt;
They are CPU dependent. &lt;/p&gt;

&lt;p&gt;. High level languages: High level language programs are made up of statements. These statements are formed by using the Syntax (Grammar) of a High level programming language.&lt;br&gt;
For example, SUM = A + B.&lt;br&gt;
It is easy for us to write programs in High level languages.&lt;br&gt;
They are machine independent.&lt;/p&gt;

&lt;p&gt;Computers can execute only Machine language programs directly. &lt;br&gt;
Therefore, we need something to translate programs written in High level language or Assembly language to Machine language.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Assembler: It is a program which will translate Assembly language programs to Machine language.&lt;/p&gt;

&lt;p&gt;Compiler: It is a program which will translate a High level language program to Machine language.&lt;/p&gt;

&lt;p&gt;Interpreter: It is a program which will translate and execute a High level language program one statement at a time. &lt;/p&gt;

&lt;p&gt;Source Program : It is a High level language program or Assembly language program given to the Compiler or Assembler as Input.&lt;/p&gt;

&lt;p&gt;Object Program : It is a Machine language program generated by the Compiler or Assembler as Output.&lt;/p&gt;

&lt;p&gt;Algorithm : It is a step by step procedure written in our own language for solving the problem.&lt;/p&gt;

&lt;p&gt;Flow Chart : It is a pictorial representation of steps for solving the problem.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;** Flow Chart to convert temperature from degrees Centigrade to Fahrenheit.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Rewn-F8h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qjgpqrt7jayjpws4ptl3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Rewn-F8h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qjgpqrt7jayjpws4ptl3.png" alt="Image description" width="551" height="764"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;. Algorithm to convert temperature from degrees Centigrade to Fahrenheit.&lt;br&gt;
Step 1: Accept Cent&lt;br&gt;
Step 2 : Fahr = Cent * 180/100 + 32&lt;br&gt;
Step 3: Display the value of Fahr.&lt;br&gt;
End of Algorithm.&lt;/p&gt;

&lt;p&gt;** Python Program to convert temperature from degrees Centigrade to Fahrenheit.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;cent=float (input("Enter temperature in centigrade: "))&lt;br&gt;
fahr=cent * 180/100 + 32&lt;br&gt;
print ("\nThe temperature in Fahrenheit is ", fahr)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;Explanation: The temperature in degrees centigrade is accepted from the key board by using the (input) function and stored in a memory location named (cent).
A formula is used to convert it to Fahrenheit and stored in the memory location (fahr).
The content of memory location (fahr) is displayed on the screen using the (print) function. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ayIBGLHf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xxwgi4y42jkr2nlw7gqh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ayIBGLHf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xxwgi4y42jkr2nlw7gqh.png" alt="Image description" width="301" height="135"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Python is a general-purpose, interpreted, high level programming language.&lt;br&gt;
It’s very popular and easy to learn.&lt;br&gt;
It was initially designed by Guido van Rossum in 1991 and developed by Python software foundation.&lt;/p&gt;

&lt;p&gt;Integrated development environment (IDE) is used to enter, edit, run and debug programs.&lt;/p&gt;

&lt;p&gt;. Variable names: These are the names of the memory locations whose contents can change during the execution of a program.&lt;br&gt;
A variable will have a name, type and value.&lt;br&gt;
Basic data types in python: int, float, str, bool&lt;/p&gt;

&lt;p&gt;.Assignment Statement: It is used to give a value to a variable.&lt;br&gt;
In algorithms and Flowcharts &amp;lt; can be used for assignment.&lt;br&gt;
In python programs the assignment operator is =&lt;br&gt;
The general form of assignment statement is&lt;br&gt;
Variable name &amp;lt; expression&lt;br&gt;
Example : c &amp;lt; a + b&lt;br&gt;
In python it’s&lt;br&gt;
Variable name = expression&lt;br&gt;
Example: c = a + b&lt;/p&gt;

&lt;p&gt;.. Thank you for reading,&lt;br&gt;
Almuhannad&lt;/p&gt;

</description>
      <category>programming</category>
      <category>python</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
