Member

[email protected]

Total likes received: 98 | Pubby Cash: 932


Articles Liked by Me: 87

How to Make Letters Horizontal, Vertical, Backwards, and Intersect when Coding a Word Search Game in Python

Categories: Tech | Pubby Cash Received:  0

Do you want to learn how to make letters horizontal, vertical, backwards, and intersect when coding a word search game in Python? If you said yes, than you should read this article, because it will teach you how. First, how to make words horizontal and how to make those horizontal words backwards. To do this, you first need to make a function. You then need to put things inside the function. Here is an example. def add_word(word,arr):# make a function     col=random.choice(lst)#chooses a random location in the columns for the word to be placed     lst.remove(col)# removes that place so another word does not get placed there     row=random.randint(0,15-len(word))# chooses a random row for the word to be placed, however the length of the word must fit into the row and cannot go over the limit     rand_num = random.randint(0,1)# 0 means that the word is backwards, 1 means that is forward     if rand_num == 0: # if the random number is 0, then you make the word backwards         word1 = word[::-1]# [::-1] makes words reversed     else: # if it is not 0, then keep it the same         word1 = word     for i in range(0,len(word1)): # printing the i         arr[col,row+i]=lett2num[word1[i]] Next I will tell you how to add the vertical words, make it backwards, and make them cross with the horizontal words. Adding a vertical word is almost the same as adding a horizontal one. The difference is that vertical ones are basically the opposite of horizontal ones. Here is an example. def add_word1(word,arr): # make a function     row=random.choice(lst)#chooses a random location in the rows for the word to be placed     lst.remove(row)# removes that place so another word does not get placed there     col=random.randint(0,15-len(word))# chooses a random column for the word to be placed, however the length of the word must fit into the row and cannot go over the limit     addvword = True # make a new variable for adding vertical word. This is so vertical words and horizontal ones can cross     count = 0 # set count to 0     rand_num = random.randint(0,1)# 0 means that the word is backwards, 1 means that is forward     if rand_num == 0: if the random number is 0, then you make the word backwards         word1 = word[::-1]# [::-1] makes words reversed     else:# if it is not 0, then keep it the same         word1 = word     for i in range(0,len(word1)):# printing the i         arr[col+i,row]=lett2num[word1[i]]     for i in range(0,len(word1)):         if arr[col+i,row]!=0:# if the adding vertical word space is taken...             addvword = False #you cannot add that vertical word there             if arr[col+i,row] == lett2num[word1[i]]:# if the array is equal to the word1 letter...                 count +=1 # add one to the count             else: # if that is not true...                 count = 0# keep count at 0     if count != 0: # if the count is not zero...         for i in range(0,len(word1)):             arr[col+i,row]=lett2num[word1[i]] # the array is equal to the word1 letter     elif addvword: # if that is not true, addvword is equal to true         for i in range(0,len(word1)):             arr[col+i,row]=lett2num[word1[i]]# you can cross the word with another word if the crossing letter is the same By now, you should have a better understanding of how to make letters horizontal, vertical, backwards, and intersect when...  Read more

Building a PC: Choosing the Right Motherboard

Categories: General, Tech | Pubby Cash Received:  10

A motherboard is the main printed circuit board in a computer. It's the computer's central communications backbone connectivity point, through which all components and external peripherals connect. Most computers made today, including smartphones, tablets, notebooks, and desktop computers, use motherboards to pull everything together, but the only kind you’ll typically purchase yourself are those made for desktop PCs. Most people hop right to the motherboard after deciding on their CPU, and there's a reason for that. You see, motherboards come in all shapes and sizes, and that means that some motherboards are designed specifically for Intel chips while others are meant for AMD chips. As you’re deciding on the right motherboard, you would want your choice to hold and last. If you want your PC the way it is, then you can choose a motherboard that provides exactly what you need to get up and running. But if you're thinking of upgrading some parts later on, then you’ll want to make sure your motherboard will support your needs as they grow.

Now that you've decided on the chip, you'll need to know a few things. You'll need to pick a motherboard that uses the right socket and the right chipset. In short, the socket is the mechanism through which a CPU is firmly attached to a motherboard. The chipset is the software and hardware that allows the various components to communicate. Here are some of the most common chipsets and sockets:

Common Sockets and Chipsets

So after solving that problem the question now is, which size should I choose? Motherboards come in 3 main sizes, with the standard ATX being the largest, followed by the mini, and then the micro. Keep in mind that while the smaller the motherboard, the cheaper it is, it also offers fewer ports and memory slots, and that might or might not make a difference in your overall experience. Here are the three most common form factors:

Motherboard Sizes

So about some of the other components, there are also slots for storage, graphics, memory, power, fans, etc. The list would go on. A good motherboard should have more than enough to meet all of the above requirements. It can be seen that an ATX motherboard would be the best option for gamers and workers alike, despite being pricier, since it can support many components. Especially when it comes down to the RAM, it's crucial to choose the right RAM to fit your motherboard. Today’s RAM plugs into a motherboard via a rectangular slot that’s named for the kind of RAM in use today: the dual in-line memory module (DIMM). The number of DIMM slots in a motherboard determines how much RAM you can add, and it most commonly varies from two to eight slots. You can add one RAM module at a time, but you will get the best performance when you install RAM in matched pairs. Obviously, the larger your motherboard, the more RAM slots it will have....  Read more

The "Brains" and "Nerves" of a PC

Categories: General, Tech | Pubby Cash Received:  10

Central Processing Unit

The CPU (central processing unit) is an essential component of a PC. It performs all types of data processing operations, stores data, and controls the operation of all parts of the computer. That sounds like a pretty important and honorable task, so wouldn't it be a shame to lack a good CPU? That's where Intel and AMD, the top CPU manufacturers come in. I'm mostly concerned about Intel's i9-10900K and AMD's equivalent Ryzen 9 3900X. Both are competing as the number one CPU. The Ryzen 9 boasts of 12 Cores and 24 Threads at 3.8GHz while the i9 has 10 Cores and 20 Threads at 3.7GHz. It's not a big difference, but one can see the slight decrease in the numbers for the i9. Just to briefly explain what cores and threads are, a core is a single individual processor (so the i9 would have 10 mini processors put together) and a thread is a single line of commands that are getting processed. Each application has at least one thread, most have multiples. The core is the physical hardware that works on the thread. In general, a processor can only work on one thread per core (CPUs with hyper-threading can work on up to two threads per core).

Now the Ryzen 9 is valued at about $423 while the i9 is at $488. But why is that? That's probably because Intel has better brand recognition due to most PC manufacturers advertising the Intel chips they use. AMD’s processors were only really used in the cheapest computers and practically nonexistent on laptops. When you have little name recognition and an inferior product, your only option to compete is at a lower price. However, despite the extra money, Intel's i9 has a better single-core performance and also uses less power (95 watts compared to 105). Additionally, with Intel's integrated graphics, you'll get both full HD and 4K video and graphical support right out of the box. You'll not only get a great picture for both streaming video and playing the latest games, but you'll get awesome frame rates as well, preventing lag and screen tearing.

Now, let's say we select Intel's chips. Then here's the next question. Is it worth it to get the 10th generation over the 9th generation? The former has 10-cores and 20 threads compared to the latter which ran with 8 cores and 16 threads. Another point to bear in mind is that Intel’s 10th generation chips have introduced enhanced overclocking features, including for example per-core hyper-threading disabling, which may help those who like to tinker and tweak to get the most out of their CPU in certain situations. Comparing the prices, the 9900 is about $450 and the 10900 is about $800. If you already own the Core i9-9900k, is it worth forking out for the 10900k? The simple answer to that would be no, not really. The 10900k’s clock speed bumps are relatively minor, plus the attention-grabbing headline 5.3GHz speed is the potential of dubious value...  Read more

Building a Gaming PC

Categories: General, Tech, Gaming | Pubby Cash Received:  0

To buy or to build? That's a question many people ask when getting a new PC. Most people just go to retail stores like Best Buy to pick up their pre-built gaming desktop machine. Not me. These are the reasons why building a PC is superior to buying a pre-built one. 1. Building a PC can save you money It is. Buying just the parts and putting by yourself is far cheaper than having someone do it for you. Those savings could be used to buy better parts such as an additional gig or two for your graphics card. 2. It's really easy to upgrade your parts When you build your PC, you’ll know exactly where each part of your system goes and how it is installed. If you determine that it isn’t performing to your liking, or if you decide you want an upgrade, replacing parts is a simple process. 3. You choose your parts Don't you hate it when you see a gaming PC deal with the latest Intel i9 processor along with 64 Gigabytes of memory but has a crappy graphics card? That's exactly why you should build your PC. Since you get to choose your parts and assemble them yourself, you will have a better experience overall gaming knowing you have the best parts in your PC and not a crappy graphics card....  Read more

How to Use NumPy in Python

Categories: Tech | Pubby Cash Received:  0

Do you know how to use NumPy, or what NumPy even is? NumPy is basically a library for the Python programming language, adding support for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays. To use NumPy, you first need to import it, like this. import numpy as np I will now show an example of what you can do with NumPy. First of all, you can do arrays with NumPy. Here is a example. arr = np.array( [[ 1, 2, 3],                 [ 4, 2, 5]] ) This code is basically saying that you are making a array object. After that, you can do some things like getting the size of the array. You can do it like this. print("Size of array: ", arr.size) The output of this would be Size of array: 6. After reading this article, I hope you have a better understanding of NumPy and how it works....  Read more

1 ... 5 6 7 ... 18

Daily Deals


MECHANICSBURG WEATHER