SEC-S20W2 - How to Prepare Yourself for Programming?

in #sec20w2sergeyk2 months ago

Assalam-o-Alaikum!!!

Greetings to my all STEEMIT fellows. Hopefully you all are fine . I am also fine ALHMADULILLAH. And today I am going to take part inSEC-20/W2 | How to Prepare Yourself for Programming?. And I will try my best to complete all tasks. And I hope that you will like and remarks me very good IN SHA ALLAH

image.png
Made in Canva

"What should you have done before to become a programmer in the future?"

To become a programmer in the future, here are key steps you should take to build a strong foundation:

1. Start with Basic Programming Languages

  • Learn Python: This is a great language for beginners due to its simplicity and flexibility. It’s used across various fields like web development, data science, and AI.
  • Explore JavaScript: Since the demand for web development is growing in Pakistan, learning JavaScript can open doors for freelance opportunities or startup ventures.

2. Develop Strong Problem-Solving Skills
Practice on Coding Platforms: Participate in coding challenges on websites like HackerRank and LeetCode. Problem-solving skills are crucial, and these platforms will sharpen your thinking.

  • Join Pakistani Coding Competitions: Local competitions, like those hosted by institutions such as NUST or P@SHA, help you engage with the local programming community and build your skills in real-world scenarios.

3. Understand Data Structures and Algorithms
Master Fundamentals: Understanding algorithms and data structures is critical. Learn about arrays, stacks, queues, linked lists, and binary trees to improve how efficiently you write code.

4. Explore Formal Education and Certifications

  • Pursue a Computer Science Degree:Many universities in Pakistan, like FAST or LUMS, offer robust computer science programs that can provide a strong theoretical background.

  • Enroll in Online Courses: Platforms like Coursera, Udemy, or local programs like PIAIC (Presidential Initiative for Artificial Intelligence & Computing) offer programming courses and certifications that are highly regarded.

5. Build Real-World Projects

  • Create Your Own Apps or Websites: Applying your knowledge to real-world projects will help you solidify your skills. You can also showcase these projects on platforms like GitHub to demonstrate your capabilities to future employers.
    Join Local Open Source Initiatives: Pakistan has growing communities focused on open-source projects. Getting involved in these will give you valuable experience and networking opportunities.
    6. Learn Version Control Tools
  • Master Git: Version control tools like Git are essential for managing code, especially when working in teams. Pakistan's tech industry is growing, and knowing Git will help you collaborate with others in the field.

7. Stay Updated with Tech Trends in Pakistan

  • Follow Local Tech Communities: Platforms like Stack Overflow, GitHub, and local tech forums are great places to stay updated on the latest trends in Pakistan’s tech ecosystem.
    Attend Tech Conferences: Events like the "Pakistan Tech Summit" or local tech meetups will help you stay current with industry developments and connect with other programmers.
Name a known before or find some simple online game (logic or puzzle). Using her example, explain how she can help a future programmer

A great example of a simple online logic or puzzle game is "Sudoku". This classic number puzzle game involves filling a 9x9 grid with numbers so that each column, row, and 3x3 sub-grid contains all numbers from 1 to 9, without repetition.

How Sudoku Can Help a Future Programmer:

  • Improves Pattern Recognition:
    Identifying patterns is key to solving Sudoku. In programming, recognizing patterns in data and processes allows you to write efficient code and solve problems faster.

  • Teaches Problem-Solving Strategies:
    In Sudoku, you often have to try different possibilities and backtrack if something doesn't work. This is similar to debugging code, where you try different solutions and adjust your approach when things break.

  • Develops Patience and Persistence:
    Some Sudoku puzzles are harder than others, requiring trial and error and persistence. As a programmer, not every problem will have an immediate solution, so patience is essential.

  • Encourages Attention to Detail:
    A small mistake in Sudoku can ruin the entire puzzle. In coding, overlooking a small error (like a typo or incorrect syntax) can break your program.

  • Promotes Algorithmic Thinking:
    Solving Sudoku can be viewed as a step-by-step process, just like writing an algorithm in programming. You can even write a program that solves Sudoku, using recursion and backtracking—giving you hands-on practice with coding techniques.

image.pngimage.png

Screen Shot during solving Puzzle

image.png
Excellent Result after solving Puzzle

Wolf-goat-cabbage

The Wolf-Goat-Cabbage problem is a well-known logic puzzle. Here's a solution breakdown:

Problem:
A man needs to transport a wolf, a goat, and a cabbage across a river.
The boat can carry only the man and one item (either the wolf, goat, or cabbage) at a time.
If left unsupervised:
The wolf will eat the goat.
The goat will eat the cabbage.

Goal:
Safely transport all three (the wolf, the goat, and the cabbage) across the river.
Solution Steps:

  • First Trip: The man takes the goat across the river.

Now, the wolf and cabbage are on the starting shore, which is safe since the wolf doesn’t eat cabbage.

  • Second Trip: The man goes back alone to the starting shore.

  • Third Trip: The man takes the wolf across the river.

Now the man, the wolf, and the goat are on the far shore.

  • Fourth Trip: The man brings the goat back to the starting shore**

  • Fifth Trip: The man takes the cabbage across the river.

Now the cabbage and the wolf are on the far shore.

  • Sixth Trip: The man returns alone to the starting shore.

  • Final Trip: The man takes the goat across the river again

Outcome:

All three (the wolf, the goat, and the cabbage) are now safely on the other shore.

Two men and two boys with a boat:

To solve the problem of getting the two men across the river with the small boat, here's one possible sequence of steps:

  • First Trip: The two boys row across to the other side together and leave one boy there.
    Return Trip: One boy returns to the original side with the boat
  • **Second Trip: One man rows across to the other side.
    Return Trip: The boy who stayed on the other side rows the boat back to the original side
  • Third Trip: The second boy rows across to the other side.
    Return Trip: One boy returns to the original side again, leaving both men on the far side
  • Fourth Trip:Finally, the boy who is on the original side rows across to the other side.
Two men and one boat

This is a classic riddle that involves a bit of lateral thinking. Here's how they could both cross the river using the boat, despite the fact that only one person fits in it at a time:

  • The first man crosses the river in the boat.
  • The second man stays on the original shore.
  • The first man leaves the boat on the opposite shore and walks along the bank of the river.
  • The second man retrieves the boat and crosses the river to meet the first man on the other side.
(+2.0 = 0.6 + 0.7 + 0.7)blockly.games

LEVEL 7:

image.pngimage.png

SOLUTION

Level 8:

image.pngimage.png

SOLUTION

LEVEL 9:

image.pngimage.png

SOLUTION

LEVEL 10:

image.pngimage.png

SOULTION

image.png

(+3,0 = 0,7 + 0,7 + 0,8 + 0,8) code.org

level 9:

image.pngimage.png

Level 10:

image.pngimage.png

Level 11:

image.pngimage.png

LEVEL 12

image.pngimage.png

image.png

(+1.0) From 0 to 100

Did you learn to code?
Imagine that the calculator only has the operation '+1'.
now on the scoreboard 0.
describe how to get 100 on the scoreboard
Now we have added one more operation 'x2'
as it is possible to get 100 on the scoreboard from zero as quickly as possible, in fewer steps

Ans: Yes, I learnt the code. This is a fun problem involving simple operations to reach the number 100, starting from 0. Let’s break it down step by step for both cases: with only +1 and then with both +1 and x2.

  • Part 1:
    Only +1 operation
    Starting at 0, every time you perform the operation +1, you increase the number by 1.
    To reach 100, you would need to perform the +1 operation exactly 100 times.
    This is straightforward, but not efficient if we're aiming for fewer steps.

  • Part 2:
    Using both +1 and x2 operations
    Now, we add the multiplication operation x2, which allows us to double the current value on the scoreboard. The goal is to get to 100 as quickly as possible by balancing between doubling and adding 1.

Here’s an efficient strategy:

Start at 0.
+1 → Now the number is 1.
x2 → Now the number is 2.
x2 → Now the number is 4.
x2 → Now the number is 8.
x2 → Now the number is 16.
x2 → Now the number is 32.
x2 → Now the number is 64.
+1 → Now the number is 65.
x2 → Now the number is 130.
-1 (reversing) → 129, 128, etc.

(+1.0) Find something similar to code.org and blockly.games

I will chooseSCRATCH. Because I love this game so much it uses technique as well as the mind and we have a lot of fun doing it and as the levels grow we also get proof of that. It's done well, so as we accomplish it, we feel a lot of joy and fun, and our bodies are refreshed and our minds are sharper.

In this game when I apply all thing then I click on the green option that is upper side then the cat will move forward and also create sound of MEAON

image.pngimage.png

So I tried my best to solve all homework tasks. And I hope you will like it

I invite my friends:
@jyoti-thelight
@alee75
@abdullahw2
@event-horizon

Special Thanks to @sergeyk

Regards: @arinaz08

Sort:  

Upvoted. Thank You for sending some of your rewards to @null. It will make Steem stronger.

Loading...

Coin Marketplace

STEEM 0.20
TRX 0.19
JST 0.034
BTC 91499.04
ETH 3111.94
USDT 1.00
SBD 2.89