Posts by Felipe • 144 points
6 posts
-
0
votes2
answers316
viewsA: Program to ask multiplication questions
If you do type(m) and type(mult) will see that the first is a str while the second is int. To solve just modify the if, making a conversion of the variable m for whole: if int(m)==mult : print…
-
2
votes1
answer630
viewsA: Why does the decrease of the subnet mask fold the size of the original network?
The mask is made to separate the network part from the host part. The bits worthwhile 1 represent the part of the network, while the bits worthwhile 0 represent the host part. And are these bits…
-
2
votes2
answers2255
viewsA: How to get the rest of a float number in C?
You want to separate an X amount of money with as few notes and coins as possible. As well noted, my previous answer had problems since the float is inaccurate. I redid the code using only integer…
-
3
votes1
answer5602
viewsA: What is the meaning of the acronyms SISD, SIMD, MISD, MIMD? What is your relationship with programming?
This table is known as Flynn’s scheme and tries to categorize parallel computers --- there are other schemes like this, but in general they end up being inaccurate (this one too). It is based on two…
-
1
votes2
answers3763
views -
2
votes2
answers2960
viewsA: Elements in common between lists
Just make the intersection of the two lists and then see the number of elements. comum=len(set(a).intersection(b))