Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Search results

  1. martian94

    Python Sorting names by using bubble and insertion sort

    I am using ChatGPT a bit and it is a bit of an enigma to use. I mean, it makes the code work but it's not up to the standard of our tutor, tutor does not like us using shortcuts such as break, exit, etc. I don't know why I am using a dictionary. I did not really think about duplicates. If I...
  2. martian94

    Python Sorting names by using bubble and insertion sort

    How would one use that in my case? I don't see how this would help solving the task?
  3. martian94

    Python Sorting names by using bubble and insertion sort

    Task: I am a little stuck, how to do this with letters? Numbers are ok as from my former posts, but how to do this? All I have this far gives me the names as they are written in the .txt-file (unsorted) and with "None" between each name. List of names if useful: Anne Jonas Aase David Stine...
  4. martian94

    Python Insertion sort

    I swear I tried to insert the print statements at every step and at some point had it where you said it should be. Anyway I copied your code and did tweak the indentation as it seems like it got erased on here, but I got the wanted output now! Thank you so much! Did not expect to get the answer...
  5. martian94

    Python Bubble sort with iteration print

    Norwegian actually, but they are very similar! :blush:
  6. martian94

    Python Bubble sort with iteration print

    For future reference and in order to help people, this is the code. Note that this is the least effective sorting algorithm, but it's a basic one that we are learning in a Python 101 course at university. def boblesortering(array): antall_tall = len(array) # Print liste med tall som...
  7. martian94

    Python Insertion sort

    Hello! This time the class is tasked with insertion sorting and we've been provided with pseudocode. This far my code is this: number_list = [5,3,1,2,4,7,6] bytter = 0 for i in range(1,len(number_list)): j = i swaps_this_far = 0 while j > 0 and number_list[j-1] > number_list[j]...
  8. martian94

    Python turtle problem

    Can you try once again to upload the picture, or maybe write what it says on the picture? Now, there is just a file path to the file you tried to upload, but we cannot access it as we do not have access to your computer. Please use the "Attach files" button under the message composer, find the...
  9. martian94

    Fun activity Hello, Codeforum World!

    For this school year (1st and 2nd semester) we are learning basic Python. Last thing we learned before the winter exams was GUI (tkinter). We will start to learn about object oriented programming soon. I know the following aren't programming languages, but there is also (My)SQL and HTML and a...
  10. martian94

    Python Bubble sort with iteration print

    I see it now, it is to the right of the upvote/downvote buttons. The checkmark in a circle icon. When you hover it the alt="Mark as solution", so I see one is supposed to mark the comments as solution(s), not the thread itself.
  11. martian94

    Fun activity Say hello... in a coding language!

    print("Hello, cli345!")
  12. martian94

    Python Bubble sort with iteration print

    I do not have the problem anymore as I stated in the last paragraph. I did it right the first time, it just looked wrong due to it being so few index switches. Do you perhaps know how to mark this as solved? I can not find the button for that. I read somewhere here that you were supposed to mark...
  13. martian94

    Fun activity Hello, Codeforum World!

    print('Hello Codeforum!') Hi! I'm one semester into a programming course at university and I would like to gain more experience in order to be a proper prospect and valuable asset to an IT company. However, I need to change gear, and the programming lecturer is not found that useful. I have...
  14. martian94

    Read Me How did you find us?

    I found you trough googling for solutions
  15. martian94

    Python Bubble sort with iteration print

    Hello! I'm new to coding and I am in the noob phase. I am tasked with creating a bubble sort algorithm. My problem is, hopefully, quite simple to you. The iterations in the print statements seem to sort the numbers list right away, instead of printing each iteration of two numbers switching...
Back
Top Bottom