What is coding?
Coding is the process of writing instructions using a programming language that a computer can understand. These instructions are called code or programs and they tell the computer what actions to perform in order to complete a task or solve a problem. Examples of programming languages include Python, JavaScript, Java, Ruby, etc. Here's a simple example in JavaScript:
javascript Copy code
let name = "SheCodes";
console.log("Hello " + name);
This code assigns the value "SheCodes" to the variable name
, and then prints "Hello SheCodes" to the console.
👩💻 What is the first thing you learn in "SheCodes"?
SheCodes offers a series of courses that cover different aspects of coding. The first course in the series is SheCodes Basics, which is an introduction to HTML, CSS, and JavaScript. In this course, you'll learn the basics of web programming, including how to build a simple website using HTML, style it using CSS, and add interactivity using JavaScript. You'll also learn the fundamentals of programming logic and how to debug your code.
👩💻 What is HTML?
HTML stands for HyperText Markup Language. It's a markup language that's used for creating web pages and web applications. HTML allows you to structure content on a web page by using tags and attributes to define headings, paragraphs, lists, links, images, and other elements.
For example, the following code in HTML creates a simple web page with a heading, a paragraph, and an image:
html Copy code
<!DOCTYPE html>
<html>
<head>
<title>My Web Page</title>
</head>
<body>
<h1>Welcome to my web page</h1>
<p>This is a paragraph of text.</p>
<img src="myimage.jpg" alt="My Image">
</body>
</html>
In this code, the <head>
section contains information about the web page, including the title that appears in the browser tab. The <body>
section contains the actual content of the web page, including the heading, paragraph, and image. Each element is defined using tags, such as <h1>
, <p>
, and <img>
, and attributes that provide additional information about the element.
👩💻 What is CSS?
CSS stands for Cascading Style Sheets. It's a style sheet language that's used to define the presentation of a web page, including layout, fonts, colors, and other visual styles. With CSS, you can separate the presentation of a web page from its content, which makes it easier to maintain and modify the appearance of a web page.
For example, the following CSS code sets the background color, font size, and font family for all <p>
elements on a web page:
css Copy code
p {
background-color: yellow;
font-size: 16px;
font-family: Arial, sans-serif;
}
In this code, p
is a selector that targets all <p>
elements on the web page. The properties that follow (background-color
, font-size
, and font-family
) are set to specific values, which define the background color, font size, and font family for all <p>
elements. By using CSS, you can control the style of multiple elements on a web page at once, making it much easier to create a consistent and visually appealing design.
👩💻 What is JavaScript?
JavaScript is a high-level programming language that's used to add interactivity to web pages and web applications. With JavaScript, you can create dynamic effects, handle user input, and modify the content of a web page on-the-fly.
For example, the following JavaScript code displays a personalized message when a button is clicked:
javascript Copy code
function showMessage() {
let name = prompt("What's your name?");
let message = "Hello, " + name + "! Welcome to my web page.";
alert(message);
}
In this code, showMessage
is a function that displays a message to the user. When the function is called, it prompts the user to enter their name using the prompt
method. It then creates a personalized message using the string concatenation operator (+
), and displays the message using the alert
method. By using JavaScript, you can create interactive web pages that respond to user input and update in real-time.
👩💻 Where do I start?
If you are interested in learning coding, there are several resources you can use to get started. Here are a few options:
SheCodes Workshops: SheCodes offers online workshops that cover different aspects of coding, including HTML, CSS, JavaScript, React, and more. These workshops are designed for beginners and provide hands-on experience in a supportive and collaborative environment.
Free online courses: There are many free online courses available that cover a wide range of programming languages and skills. Some popular platforms include Codecademy, Udacity, edX, and Coursera.
YouTube tutorials: You can find many free coding tutorials on YouTube that cover different topics, languages, and skills. Make sure to check the reviews and ratings of the tutorial before starting to ensure the quality of the content.
Books and eBooks: There are many books and eBooks that cover different aspects of coding and can be great resources for learning at your own pace. Some popular books include "HTML and CSS: Design and Build Websites" by Jon Duckett and "JavaScript and JQuery: Interactive Front-End Web Development" by Jon Duckett.
No matter what resource you choose, remember that learning to code takes time, practice, and patience. Start with the basics and build your skills gradually, and don't be afraid to seek help or advice from others. Good luck!
print("Welcome to my computer quiz!") playing = input("Do you want to play? ") if playing != "yes": quit() print("Okay! Let's play :)") answer = input("What does CPU stand for? ") if answer == "central processing unit": print('Correct!') else: print("Incorrect!") answer = input("What does GPU stand for?") if answer == "graphics processing unit": print('Correct!') else: print("Incorrect!") answer = input("What does RAM stand for?") if answer == "random access memory": print('Correct!') else: print("Incorrect!") please fix indentations
Here's the corrected code with proper indentations (Python):
code Copy code
print("Welcome to my computer quiz!")
playing = input("Do you want to play? ")
if playing != "yes":
quit()
print("Okay! Let's play :)")
answer = input("What does CPU stand for? ")
if answer == "central processing unit":
print('Correct!')
else:
print("Incorrect!")
answer = input("What does GPU stand for? ")
if answer == "graphics processing unit":
print('Correct!')
else:
print("Incorrect!")
answer = input("What does RAM stand for? ")
if answer == "random access memory":
print('Correct!')
else:
print("Incorrect!")
how to add html image from computer download
To add an image from your computer to an HTML file, you can use the img
tag and set the src
attribute to the path of the image file in your computer. Here's an example:
html Copy code
<img src="path/to/your/image.jpg" alt="Description of your image">
Make sure to replace "path/to/your/image.jpg" with the actual file path and name of your image, and provide a short description of your image in the alt
attribute. This description helps users with visual impairments understand the content of the image.
You can also use a relative path if the image file is in the same directory as your HTML file. For example, if your image file is named "myimage.jpg" and is in the same folder as your HTML file, you can use the following code:
html Copy code
<img src="myimage.jpg" alt="Description of your image">
If the image is not in the same folder, the path needs to include the folders between the HTML file and the image file.
Remember that when you share your HTML file with others, they will need to have the image file saved in the same location on their computer as you had on yours for the image to show up.
If you have any other questions, you can easily reach out to us here
AI stands for Artificial Intelligence. AI bots are able to learn from conversations with users and expand their knowledge this way.
SheCodes Athena will help you with technical questions about your code using artificial intelligence to find the answer. Imagine a super powerful human who has memorized everything on the internet and can access that knowledge in a matter of seconds. 🤯
SheCodes Athena can answer most coding-related questions, even complicated ones! It can even find bugs in your code and tell you how to fix them in just a few seconds. Impressive, right?
Just remember we're still in testing mode so the AI may return strange or incorrect replies. Feel free to message us if this happens!
SheCodes Athena can only reply to coding-related technical questions. The same type of questions you would ask in the channels on Slack.
For questions that are not coding-related, write us here 😃
You should treat Athena like a SheCodes team member, so always be polite! 😊 Ask your questions as detailed as possible, just like you would do on Slack.
Here are some examples:
- Prettier isn't working on my VS Code. How do I fix this?
- How do I make bullet points with different colors using the list element?
- My code in Codesandbox is having some issues. Can you please tell me what the issue is? [Include the link to your Codesandbox]
For now, SheCodes Athena is limited to 5 questions per day for each student.
In that case, you can either ask SheCodes Athena a follow-up question, or you can post on the designated weekly channel on Slack!
Our technical assistants are still available on Slack and are always happy to help! 😍💪
Remember, questions are limited to 1000 characters.
- If you're working with an HTML file: Post a snippet of your code related to the issue you're having (just copy the code and paste it into the question box).
- If you're working with Codesandbox: Good news, you can just post the link to your Codesandbox and the AI Assistant will be able to view your code.
- If you have a longer question that would require an entire HTML file or more than 1000 characters, post it in the designated weekly channels on Slack! 😃
Athena was the Greek goddess of wisdom, among other elements. She received her name from the city of Athens, which she is known for protecting.
Much like the goddess Athena, SheCodes Athena is also incredibly wise and can solve complicated coding puzzles in a matter of seconds! 😍
Not likely. AI can automate tasks and make developers' jobs more efficient but it can't fully replace the human ability to deal with complex software. And AI will still require human developers to supervise and improve it further.
So developers may see their tasks change but they won't be replaced by AI. 👩💻🤝💻