Python Forum
Python OOP - two numbers
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python OOP - two numbers
#8
Hi, thanks for the replay, appreciated :)
1. It is , look at my question - it says exactly what to do ( first start with small, big ) - then make it so it doesnt matter ( but keep the small and big thingy - I think, he didnt say to remove it, only just so if I write big or small, it will do the same order.

2. as said in 1, the question wanted it

3.sorted - ofc, it could, but it would ruin the point lol, our teacher dont want us to use python infunctions yet, he want us to learn ( we learnt a few time ago bubble, merge, select and quick sort, we had a lot of practice ). thats why I didnt use sort, it would ruin the whole point of the question ( as said in 1 and 2 ).

4. GCD - again, as said in the question, he asked for it recursively, I wrote it.

5. method seven_boom_range also could be a function that returns the __repr__'s str value, it also does not use any of the class attributes or methods, this looks like a function trying to look like a class.
didnt really understand what you mean? could explain it further? I didnt understand what you mean by that it doesnt use any class attributes?

6. empty - yea I know, its a little meaningless as I didnt name it for a project, but I guess you are right, I should get used to name variables to their names in small questions also.

7. seven_boom_range repeats the ordering of small & big that has already been done in the __init__
what do you mean? what range? you mean the if statement about if bla bla > bla? If I remove it, the code wont work. I will try to make it work somehow, but the list wont be any good.

But just a question. the seven boom function, is there any way of creating it with a return statement but without a list? i can do it with print, but I need it to be on return statement.
Reply


Messages In This Thread
Python OOP - two numbers - by ben1122 - Sep-27-2021, 05:35 PM
RE: Python OOP - two numbers - by ben1122 - Sep-27-2021, 05:42 PM
RE: Python OOP - two numbers - by ben1122 - Sep-28-2021, 05:16 PM
RE: Python OOP - two numbers - by Yoriz - Sep-28-2021, 05:36 PM
RE: Python OOP - two numbers - by ben1122 - Sep-28-2021, 05:55 PM
RE: Python OOP - two numbers - by ben1122 - Sep-30-2021, 04:30 PM
RE: Python OOP - two numbers - by Yoriz - Sep-30-2021, 06:04 PM
RE: Python OOP - two numbers - by ben1122 - Sep-30-2021, 06:17 PM
RE: Python OOP - two numbers - by Yoriz - Sep-30-2021, 06:22 PM
RE: Python OOP - two numbers - by ben1122 - Sep-30-2021, 06:38 PM
RE: Python OOP - two numbers - by Yoriz - Sep-30-2021, 06:51 PM
RE: Python OOP - two numbers - by ben1122 - Sep-30-2021, 07:03 PM
RE: Python OOP - two numbers - by Yoriz - Sep-30-2021, 07:07 PM
RE: Python OOP - two numbers - by ben1122 - Sep-30-2021, 07:09 PM
RE: Python OOP - two numbers - by ben1122 - Sep-30-2021, 07:16 PM
RE: Python OOP - two numbers - by Yoriz - Sep-30-2021, 07:14 PM
RE: Python OOP - two numbers - by Yoriz - Sep-30-2021, 07:28 PM
RE: Python OOP - two numbers - by ben1122 - Sep-30-2021, 07:40 PM
RE: Python OOP - two numbers - by Yoriz - Sep-30-2021, 07:59 PM
RE: Python OOP - two numbers - by ben1122 - Sep-30-2021, 08:06 PM
RE: Python OOP - two numbers - by deanhystad - Sep-30-2021, 09:25 PM
RE: Python OOP - two numbers - by ben1122 - Oct-01-2021, 09:40 AM
RE: Python OOP - two numbers - by ben1122 - Oct-01-2021, 09:46 AM
RE: Python OOP - two numbers - by deanhystad - Oct-01-2021, 01:15 PM
RE: Python OOP - two numbers - by ben1122 - Oct-01-2021, 05:39 PM
RE: Python OOP - two numbers - by deanhystad - Oct-01-2021, 05:50 PM
RE: Python OOP - two numbers - by Yoriz - Oct-01-2021, 05:55 PM
RE: Python OOP - two numbers - by ben1122 - Oct-01-2021, 06:22 PM
RE: Python OOP - two numbers - by Yoriz - Oct-01-2021, 06:24 PM
RE: Python OOP - two numbers - by ben1122 - Oct-01-2021, 07:18 PM
RE: Python OOP - two numbers - by deanhystad - Oct-01-2021, 07:44 PM
RE: Python OOP - two numbers - by ben1122 - Oct-02-2021, 01:03 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Random Generator: From Word to Numbers, from Numbers to n possibles Words Yamiyozx 2 1,521 Jan-02-2023, 05:08 PM
Last Post: deanhystad
  Convert list of numbers to string of numbers kam_uk 5 3,133 Nov-21-2020, 03:10 PM
Last Post: deanhystad
  Regular Expressions in Files (find all phone numbers and credit card numbers) Amirsalar 2 4,188 Dec-05-2017, 09:48 AM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020