React with Tech and Music

React with Tech and Music Contact information, map and directions, contact form, opening hours, services, ratings, photos, videos and announcements from React with Tech and Music, Port Harcourt.

Learn programming and software development from scratch, with FREE weekly lessons on Javascript, C #, Python, CSS and HTML, Including ASP.Net, Reactjs, Reduxjs Blozor Razor, Nextjs, Nodejs, Microsoft Azure, MongoDB and Firebase.

26/08/2022

Lesson One (unit 6)

Solution to lesson one unit 4 challenge

The following code is one possible solution for the challenge.
Console.WriteLine("This is the first line.");
Console.Write("This is ");
Console.Write("the second ");
Console.Write("line.");

This code is merely one possible solution, because we didn't specify which technique to apply to which line of output. However, you should have written both in one line as follows:
Console.WriteLine("This is the first line.");
Console.WriteLine("This is the second line.");

If you were successful, congratulations!
Important
If you had trouble completing this challenge, review the unit again before you continue. All new ideas we describe in future will depend on your understanding of the ideas that were presented in this lesson.

Lesson One (unit 5)Knowledge Check1. What is the primary job of the compiler?A. The compiler primarily locates spelling ...
26/08/2022

Lesson One (unit 5)

Knowledge Check

1. What is the primary job of the compiler?

A. The compiler primarily locates spelling mistakes in your code.
B. The compiler primarily reformats your code.
C. The compiler primarily executes your code.
D. The compiler primarily converts your code into an executable format that the computer can understand.

2. Which of the following statements is true about C #

A. C # is case insensitive.
B. Console is a method, and WriteLine() is a class.
C. You use double-quotation marks to create a literal string.
D. If you make a mistake when writing code, you have to delete it all and start over.

3. What is wrong with this line of code? Console.WriteLine("What is wrong with me?")

A. The L in WriteLine should be lower-case.
B. It's missing a semi-colon at the end
C. The string should use single-quotes.
D. A comma should be used instead of a dot between Console and WriteLine.

Please Comment your answers and share

26/08/2022

Lesson One (unit 4)

Summary
Our goal is to write code that will display simple messages to an output console, and in doing so, become familiar with the syntax. We wrote our first lines of code using basic C # syntax. We learned two techniques for displaying literal-string data to the console. We learned what to look for when we come across an error in our code. And lastly, we identified C # syntax elements like classes and methods, and the purpose of several special symbols that are known as operators.
Congratulations on taking your first steps to building more sophisticated applications.

Challenge
Code challenges throughout these lesson will reinforce what you've learned and help you gain some confidence before continuing on.
Step 1: Delete all of the code from the earlier exercise
Step 2: Write code to display two messages
This is the first line.
This is the second line.

Pls comment your answers and share someone might need it

25/08/2022

Lesson One (unit 3)

What is a programming language?
The instructions we write in a programming language is called "source code", or just "code".

At this point, the code can be updated and changed by a software developer, but the computer can't understand the code. It first must be compiled into a format that the computer can understand.

What is compilation?
A special program called a compiler converts our source code into a different format that is executable by the computer's CPU. When run the command dotnet run, the code we wrote was first compiled, then executed.

Why do we need to compile our code?
Even though most programming languages seem cryptic at first, they can be more easily understood by humans than the computer's preferred language, which is expressed by turning thousands or millions of tiny switches either on or off. Compilers bridge these two worlds by translating our human-readable instructions into a computer-understandable set of instructions.

What is syntax?
The syntax of a programming language includes the keywords, the operators (those special keyboard characters like the semicolon or parenthesis), and other grammar rules that the compiler enforces. The lines of code you typed followed about a dozen different syntax rules and used at least four different operators. There's much to learn, but fortunately each concept is simple. Don't give up! You can learn it!

When you entered code, you may have noticed subtle changes to the color of different words and symbols. Syntax highlighting is a helpful feature that you'll begin to use to easily spot mistakes in your code that don't conform to the syntax rules of C #. In fact, a similar (and even more robust) version of this feature is available in Visual Studio Code and the full Visual Studio IDE.

How did our code work?
Let's focus on the following line of code we wrote. When we ran our code, we saw that the message Hello World! was printed to the output pane. When the phrase is surrounded by double-quotation marks in our C # code, it's called a literal string. In other words, we literally wanted the characters H, e, l, l, o, and so on, sent to the output. We'll learn more about literal strings later.
The WriteLine() part is called a method. We can always spot a method because it has a set of parenthesis after it. Each method has one job. The WriteLine() method's job is to write a line of data to the output window. The data that's printed is sent in between the opening and closing parenthesis as an input parameter. Some methods need input parameters, others don't. But if we want to invoke a method we must always use the parenthesis after the method's name. The parentheses are known as the method invocation operator. We'll learn more about calling methods.
Note: Console.WriteLine() and Console.Write() methods produces the same output.
The Console part is called a class. Classes "own" methods, or perhaps a better way to say it is that methods live inside of a class. To visit the method, we must know which class it's in. For now, think of a class as a way to store and organize all of the methods that do similar things. In this case, all of the methods that operate on our Output pane are defined inside of the Console class.
Note: C # is a case-sensitive language, meaning that the C # compiler considers the words console and Console as different as the words cat and dog.
There is also a dot, or period, that separates the class name Console and the method name WriteLine(). The period is the member access operator. In other words, the dot is how we "navigate" from the class to one of its methods.
Finally, the semi-colon is the end of statement operator. A statement is a complete instruction in C #. The semi-colon tells the compiler that we're finished entering the command.

Understand the flow of ex*****on
Also, it's important to understand the flow of ex*****on. In other words, our code instructions were executed in order, one line at a time, until there were no more instructions to execute. Some instructions will require the CPU to wait before it can continue. Other instructions can be used to change the flow of ex*****on. we'll learn about these special situations as we learn more C # syntax and methods in the .NET Class Library.

Lesson One (unit 2)Create your appIn your terminal, run the following commands to create your app:dotnet new console -o ...
25/08/2022

Lesson One (unit 2)

Create your app
In your terminal, run the following commands to create your app:
dotnet new console -o MyApp -f net6.0
Then, navigate to the new directory created by the previous command:
cd MyApp

What do these commands mean?
The dotnet new console command creates a new console app for you.
The -o parameter creates a directory named MyApp where your app is stored and populates it with the required files.
The -f parameter indicates you're creating a .NET 6 application.
The command cd MyApp changes your current directory to the one just created for the new app.
The main file in the MyApp folder is called Program.cs. By default, it already contains the necessary code to write "Hello, World!" to the Console. The following code shows the contents of this file when the project is created:
Program.cs
Console.WriteLine("Hello, World!");

Run your app
In your terminal, run the following command:
dotnet run
you should see an output similar to the following:
Hello World!

Congratulations, you've built and run your first .NET app!

Edit your code
Open the Program.cs file in any text or code editor, such as Notepad or Visual Studio Code. The Program.cs file is located on the newly created MyApp directory.
Then, add the highlighted line after the code that prints "Hello, World!", like the following:
Console.WriteLine("Hello, World!");
Console.WriteLine("The current time is " + DateTime.Now);
Save the Program.cs file and run your code again:
dotnet run
If you succeed, you should see an output similar to the following:
Hello World! The current time is 8/24/2022 5:03:02 PM

How it works
To understand how our code works, we need to step back and think about what a programming language is and how it communicates our commands to the computer.

Lesson One (unit 1)Writing code with C # The C # programming language allows you to build many types of applications, li...
25/08/2022

Lesson One
(unit 1)
Writing code with C #
The C # programming language allows you to build many types of applications, like:
• Business applications to capture, analyze, and process data
• Dynamic web applications that can be accessed from a web browser
• Games, both 2D and 3D
• Financial and scientific applications
• Cloud-based applications
• Mobile applications

Installations
Before we start let’s setup our coding environment by installing the necessary tools that we will need
• Install Visual studio code
• Install C # Extension in Visual Studio Code Extensions
• Install .NET 6 SDK

Check everything installed correctly
Once you've installed, open a new terminal and run the following command:
dotnet
If the installation succeeded, you should see an output in the Terminal similar to the following:
Usage: dotnet [options]
Usage: dotnet [path-to-application]
Options: -h|--help Display help. –info
Display .NET information. --list-sdks
Display the installed SDKs. --list-runtimes
Display the installed runtimes.
path-to-application: The path to an application .dll file to execute.
If everything looks good, then Continue.

Got an error?
If you receive a dotnet: command not found error, make sure you opened a new terminal window. If you can't resolve the issue, use the I ran into an issue button to get help fixing the problem.

Address

Port Harcourt
500272

Telephone

+2348065711098

Website

Alerts

Be the first to know and let us send you an email when React with Tech and Music posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Contact The Business

Send a message to React with Tech and Music:

Share