Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

erikpc43

Member
  • Content Count

    19
  • Joined

  • Last visited

Awards


This user doesn't have any awards

About erikpc43

  • Title
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. erikpc43

    Java aligment

    Hello, i have just one question about aligment in PRINTF() in java. How could i align given text in center? For example I want to print text like this: ## This is test ## how could I center align whole text? So "This is test" is in the middle? I know for right and left aligment but I need center. thanks
  2. erikpc43

    Python

    If a dictionary is given like : names = { "Peter": ("computer", "headphones", "chair), "John": ("table", computer"), "Ken": ( "headphones"), "Ben": ("chair", "table" ) } Now how can i return a set that will contain keys with the same values? it should be in alphabetical order by names like in this case { ("John", "Peter"), ("Ken", "Peter"), ("Ben", "Peter"), ("Ben", "John") }. Thanks
  3. erikpc43

    Function

    Yes this is one way to do it. But i would really like to write everything in one line.
  4. erikpc43

    Function

    Hello, i have a question about a function that I'm coding. I have a list that contains pairs like ("Thomas", "pen"), ("Mike", "pencilcase"), ("Thomas", "rubber"), ("Tom", "scissors") i would like to return a dictionary which keys would be the names of people and values should be everything the person "owns". It should return a dictionary like this: {"Thomas": {"pen", "rubber"}, "Mike": {"pencilcase"}, "Tom": {"scissors"}} What can i do here? Edit: Im using python and i would like to write everyting in one line
  5. erikpc43

    Python

    Hello, So all that written function does is that it reads two lists and it gives back another list which contains numers that appear in both list compaired only once. So the function on picture should return (16,2,1). But instead it gives me back list (16,4,2,1). Order in list doesn't matter. What could I try? I would appreciate any help. Thanks
  6. erikpc43

    Problem with function

    if you enter number 22 it gives back a list [16, 4, 2] if you enter 42 it gives back [32, 8, 2] if you enter 10 it gives back [8, 2] I hope you get the point.
  7. erikpc43

    Problem with function

    Hello, I have a problem with this function in picture. The function first finds the biggest 2 exponent of given number. So in this case is 2^4 which equals to 16. Then takes this number and subtract it from the given number which in this case is 22. And then again finds the biggest 2 exponent. So 22-16 is 6 and it finds 4 and again 6-4 is 2 and it finds 2. And it also add all numbers to list. So the function returns (16, 4, 2). This works just fine if you don't try larger numbers than 22, like the one in second pic, its to much to hadle and it takes too much time then. How could i fix the problem?
  8. erikpc43

    Need some help in python

    i though of that as well but it won't work. random.randint(-1,1) Traceback (most recent call last): File "<input>", line 2, in <module> AttributeError: 'builtin_function_or_method' object has no attribute 'randint'
  9. erikpc43

    Need some help in python

    I have just one question. If i want to generate a radom number between 0-1 I type in random() and it gives me a number. But what do i need to do to get a random number between -1 and 1? I have tried everything. pls help
  10. erikpc43

    Pc doesn't boot, fans spin for a sec

    it was the ssd that was causing all the problems. I cant thank you guys enough. You saved my day.
  11. erikpc43

    Pc doesn't boot, fans spin for a sec

    So let me get this straight. First i have to remove ssd or hdd one by one and each time i remove a disk i have to try to turn the pc on. Then if nothing is changed I remove the gpu and again try to power it on, same goes for ram? and eps power connector?
  12. erikpc43

    Pc doesn't boot, fans spin for a sec

    This pc has run on this hardware a couple years ago and it ran just fine. So technically the motherboard should work with cpu.
  13. erikpc43

    Pc doesn't boot, fans spin for a sec

    This pc has run on this hardware a couple years ago and it ran just fine. I just added a new gpu, I also try swapping gpu for a basic one and it still didn't work. So that couldn't be the case.
  14. erikpc43

    Pc doesn't boot, fans spin for a sec

    no i cant, i have to pull the power cable out and back in again
  15. erikpc43

    Pc doesn't boot, fans spin for a sec

    Spesc: i7 5820k with corsair h100i cooling asus x99 pro 16gb ddr4 2400mhz corsair cx750m 240gb ssd
×