This wiki has very good and detailed infos: Latex guide 3.
and this too

Latex code begins with: \\(\)( and ends with: \)
to center it u can use: \[ and \]

short Latex-test 200\lfloor \approx 200\rfloor
3\boxed{3} \(\boxed{3}\) to write this as text use: \\(\)(\boxed{3}\\)

Note by Num Ic
4 months, 3 weeks ago

No vote yet
1 vote

  Easy Math Editor

This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.

When posting on Brilliant:

  • Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
  • Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
  • Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.
  • Stay on topic — we're all here to learn more about math and science, not to hear about your favorite get-rich-quick scheme or current world events.

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold

- bulleted
- list

  • bulleted
  • list

1. numbered
2. list

  1. numbered
  2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1

paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
    # 4 spaces, and now they show
    # up as a code block.

    print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in \( ... \) or \[ ... \] to ensure proper formatting.
2 \times 3 2×3 2 \times 3
2^{34} 234 2^{34}
a_{i-1} ai1 a_{i-1}
\frac{2}{3} 23 \frac{2}{3}
\sqrt{2} 2 \sqrt{2}
\sum_{i=1}^3 i=13 \sum_{i=1}^3
\sin \theta sinθ \sin \theta
\boxed{123} 123 \boxed{123}

Comments

Sort by:

Top Newest

i found some interesting TedEx video about coding: Episode10. i found the last episode first, but i assume it's better to watch them from the start ;-) think like a coder

num IC - 1 month, 2 weeks ago

Log in to reply

ah, that, I've already watched the whole series before ;)

Jonathan Eshetu - 1 month, 2 weeks ago

Log in to reply

Nice & helpful discussion @num IC

SRIJAN Singh - 4 months, 3 weeks ago

Log in to reply

;-) ty. i didnt meant to make an official post. by accident i pressed save instead of edit.
thanks to u i know how to use notes. since then i use notes to test latex before i post it.
before i discovered this, my latex posts had a lot of post-edit-post-edit-post chains.

num IC - 4 months, 3 weeks ago

Log in to reply

I have deleted the chatbot discussion .Is there any problem or it is fine?

SRIJAN Singh - 4 months, 3 weeks ago

Log in to reply

Your welcome.

SRIJAN Singh - 4 months, 3 weeks ago

Log in to reply

OΔ   ΘΞΦΩ\large{\boldsymbol{ \Box \oplus} \nabla \boldsymbol{ \oslash \mathbb{O} \Diamond} \Delta \boldsymbol{ \ominus \otimes \odot ~~~ \ast \circ \triangle \Theta \Xi \Phi \Omega} }
OΔ   ΘΞΦΩ\large{ \Box \oplus \nabla \oslash \mathbb{O} \Diamond \Delta \ominus \otimes \odot ~~~ \ast \circ \triangle \Theta \Xi \Phi \Omega }

num IC - 4 months ago

Log in to reply

its all fine. ty again for the idea of creating a chatbot. when i find some spare time i ll try to implement it, like it is shown in the video.

num IC - 4 months, 3 weeks ago

Log in to reply

Your huge welcome!

SRIJAN Singh - 4 months, 3 weeks ago

Log in to reply

andendswith:200 and ends with: 200 lol

Half pass3 - 4 months, 2 weeks ago

Log in to reply

Very simple latex

SRIJAN Singh - 4 months, 2 weeks ago

Log in to reply

;-) and can be copied (-;

num IC - 4 months, 2 weeks ago

Log in to reply

@num IC i noticed you have been having problems with this Oren-Ben-Dov guy can you png me as a reply to one of his messages for me and i will leave a nice suprise making sure he does not do that again

NSCS 747 - 4 months ago

Log in to reply

i just wrote to him. i assume he just have no idea how to have a fruitful discusion.
i dont want you to "send a surprise". i assume talking to him makes more sense.
but it would be nice if you could teach me, how to surprise someone. ;-)

num IC - 4 months ago

Log in to reply

no it is solely on;y for me and percy as hamza has disgraced us and leaked it to another person specificly going against what it is for

NSCS 747 - 4 months ago

Log in to reply

@mention[10644076:Toska Pi] i cannot see your post since i m no premium member, if you have a question, please feel free to post it here.

num IC - 4 months ago

Log in to reply

@Num Ic – Thank you, I'll remember that. This was what my post said from the shifting supports challenge: Hi again! This was a very helpful reply and it answered my question. Thank you for helping me out (even though my question was confusing to understand) :):)

Toska Pi - 4 months ago

Log in to reply

as i remember: the question was about "fixed CoM". you are welcome, i m glad that i could help

num IC - 4 months ago

Log in to reply

Latex is a bit confusing, to be honest. I don't really get it, but I don't think I need it much for Brilliant solution posting.

Jonathan Eshetu - 4 months ago

Log in to reply

@Jonathan Eshetu nice, you found the page ;-)
since you know how to code, latex will be easy for you. when u wanna try it, i offer my help.
but anyway i just refered to this page, so we can communicate.

num IC - 4 months ago

Log in to reply

Thanks! :)

Can I also chat to you on here about python, instead of just latex? Just in case I have any questions.

Jonathan Eshetu - 4 months ago

Log in to reply

@Jonathan Eshetu ;-) here you can chat about everything. there is no off-topic delete like in the daylies.
feel free to ask. there are better coders here, but i will help as good as i can.
i created this page by accident. i just wanted to test the latex output to avoid a post-change-post-chain.
but now i keep it bcs its convenient.

num IC - 4 months ago

Log in to reply

Heyo, someone give me a problem to solve with python.

Jonathan Eshetu - 4 months ago

Log in to reply

what about the daily challenges?

num IC - 4 months ago

Log in to reply

I've already completed most of the ones that you could solve with programming...but thanks for the suggestion.

Jonathan Eshetu - 4 months ago

Log in to reply

@Jonathan Eshetu for starters: find the greatest common divisor for two numbers, without using the python gcd-function

num IC - 4 months ago

Log in to reply

@Num Ic

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
print("Pick two numbers to find the greatest common divisor")
a = input()
b = input()
cd = 0
a = int(a)
b = int(b)
if a > b:
    for i in range(1, b+1):
        if a%i == 0 and b%i == 0:
            if i > cd:
                cd = i
else:
    for i in range(1, a+1):
        if a%i == 0 and b%i == 0:
            if i > cd:
                cd = i

print(cd)

Jonathan Eshetu - 4 months ago

Log in to reply

@Jonathan Eshetu Is that good?

Jonathan Eshetu - 4 months ago

Log in to reply

@Jonathan Eshetu overal nice. some improvements: a = int(input())

i = min(a,b)
while a%i !=0 or b%i !=0:
    i -= 1
cd = i
print(cd)

num IC - 4 months ago

Log in to reply

@Num Ic Wow, I didn't think of that approach, I'm so used to for loops. I feel so stupid for not thinking of using min() too.

I'm assuming you meant b%i by the way.

Jonathan Eshetu - 4 months ago

Log in to reply

@Jonathan Eshetu ty i corrected it.
its not my intention to make u feel stupid.

num IC - 4 months ago

Log in to reply

@Jonathan Eshetu what is the difference between the condition that i used and your condition?
there is an algorithm from euklid for gcd.
can you implement it as recursive function?

num IC - 4 months ago

Log in to reply

@Num Ic Sorry, I lost you at euklid.

What does euklid and recursive mean?

Jonathan Eshetu - 4 months ago

Log in to reply

@Jonathan Eshetu i assume u will get that in school soon too.
its about a/b = x + remainder and then divide by the remainder and repeat until the final remainder is 0.
i propose to check the web to find it. i can explain it here, but one approach to programming is to find algorithms and implement them.

num IC - 4 months ago

Log in to reply

@Num Ic Oh ok, so I did some research. I knew about the euclidean algorithm for finding the gcd, I just didn't know that was the name. So you want me to implement the euclid approach in python, using recursion (calling a function within itself)? I'll try.

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Num Ic

1
2
3
4
5
6
7
def euclidGCD(a, b):
    if a == 0:
        print(b)
    elif b == 0:
        print(a)
    else:
       euclidGCD(b, a%b)

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Jonathan Eshetu one change:

def euclidGCD(a, b):
    if a == 0:
        return(b)
    elif b == 0:
        return(a)
    else:
       return(euclidGCD(b, a%b))

very good. you are fast. i would return the gcd, so it can be used instead of print, but as i said: very good and quick

num IC - 3 months, 4 weeks ago

Log in to reply

@Num Ic I used return at first, but I accidentally put return a instead of return(a) And nothing outputted when I called the function, so I got confused.

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Jonathan Eshetu hm, as far as i know, "return a" and "return(a)" should return the same value. how did u do the box around the return ?
return just returns a value ;-).
to print it, call print(euclidGCD(34, 4))

num IC - 3 months, 4 weeks ago

Log in to reply

@Num Ic Ohhh, that's my mistake. I didn't add the print, I just called the function.

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Jonathan Eshetu yeah, print is mainly for checking.
to use it, it would be like:
g = euclidGCD(8, 4)

num IC - 3 months, 4 weeks ago

Log in to reply

@Num Ic Yeah, that makes sense. To be fair though, in an actual program you could just use the actual gcd function.

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Jonathan Eshetu yeah, the calling of your own functions is used the same way as built-in functions.
since you already created code for the daily challenges, you can also check the coding solves by other users. its a good way to get some coding experience just to read coding done by others.
carsten kaminski writes very impressive code. it sometimes took me a while to understand his cool solutions.

num IC - 3 months, 4 weeks ago

Log in to reply

@Num Ic Ah, I've seen some of his solutions. They're very hard to understand, but I try.

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Jonathan Eshetu in your text, the return is in a little box. how did you do that?

num IC - 3 months, 4 weeks ago

Log in to reply

@Num Ic just put three tick marks ` before and after. like this

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Jonathan Eshetu ok thank you, i didnt know that

num IC - 3 months, 4 weeks ago

Log in to reply

@Num Ic You're most certainly welcome. I found it out on accident :)

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Num Ic Thank you though!

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Jonathan Eshetu so check the other codes first. all reading of code helps to get new ideas. (i proposed carstens code just if u wanted to have a challenge.)

num IC - 3 months, 4 weeks ago

Log in to reply

@Num Ic It does. You can learn a lot by reading others solutions on brilliant, one of my favorite features.

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Jonathan Eshetu i did the free course on this page: coursera.org
it is in russian, but i translated the pages (i ignored the videos)

num IC - 4 months ago

Log in to reply

@Num Ic I'll check that out, thanks!

I've just been using Brilliant's python course and self-study, but that seems better.

Jonathan Eshetu - 4 months ago

Log in to reply

@Jonathan Eshetu we used different conditions. can you explain what the difference between those conditions is?

num IC - 3 months, 4 weeks ago

Log in to reply

@Num Ic I might have the wrong definition of condition, but essentially you checked if it DIDN'T work (a%i != 0 or b%i != 0), from the top down (i -= 1). This allows the program to stop when it finds a value. In my case, I checked if it DID work (a%i == 0 and b%i == 0) and went from the bottom up (for i in range(1, b+1)). Since we're looking for the GREATEST common divisor, going from the top down allows you to stop when you find a value, because that value is already the greatest possible number.

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Jonathan Eshetu very good. you got it and you also explained it very well.

num IC - 3 months, 4 weeks ago

Log in to reply

@Num Ic Thanks! These mini-exercizes/explanations are helping a lot.

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Jonathan Eshetu you can also use "python" in the search bar. some users post python quests.
i just found this: Using Recursion (Python loop) and this: Break the Code

num IC - 3 months, 4 weeks ago

Log in to reply

@Num Ic The first problem I got pretty easily, but I'm still confused over the second...

Could you please explain, if you got it? I'm just scratching my head right now...

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Jonathan Eshetu nice solution for the first problem.
for the second: its a nice example to show that it might cause problems if a function is used as argument for the function itself.
the return value is 3 + something. so i checked what happened if n=3.
_ = 4 will result in return 0 -> no problem
_ = 3 will result in return 0 -> no problem
_ = 2 will result in return 3+something -> might cause a problem
but you can also use a loop and call the function with different values to check the results. i do this sometimes to figure out if there might be an error.
have u checked the russian course?

num IC - 3 months, 4 weeks ago

Log in to reply

@Num Ic Wait...but by that logic, don't all values not work?

If n = 5, then 4 3 and 2 all result in leaving something....right?

And no, I haven't checked the course out, sorry! I'll get to that soon.

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Jonathan Eshetu ;-) it was no "task" to check that course. just a proposal.

num IC - 3 months, 4 weeks ago

Log in to reply

@Num Ic :) But still, wouldn't all values be correct for the problem?

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Jonathan Eshetu you can just create the code for all 3 _ values and then check it for 1 to 100 as input.

num IC - 3 months, 4 weeks ago

Log in to reply

@Num Ic I'll get back to you in the morning on this, because my head is hurting a little too much right now. Good night!

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Jonathan Eshetu np. take care

num IC - 3 months, 4 weeks ago

Log in to reply

@Num Ic Ok, so I think I get it now.

The reason it's 2 is because eventually, the program will simplify to

3 + rec(3)

Because when you keep subtracting the number, it will eventually go below 0, and then everything will simplify to the above equation. But when you calculate the return value, it becomes 3 + 3 + rec(rec(3-_), and if the blank is less than 3, it will result in rec(natural number), which causes an infinite loop. Eg. 3 + rec(rec(5-3)); 3 + rec(rec(2)); 3 + rec(3 + rec(rec(2-3))); 3 + rec(3 + rec(rec(-1))); 3 + rec(3 + 0); 3 + rec(3) (it always simplifies to this); 3 + rec(rec(3-3))) (since the blank is 3, the rec function goes down to 0); 3 + 0; 3; However, if it was say 2; 3 + rec(3); 3 + rec(rec(3-2)); 3 + rec(rec(1)); 3 + rec(3 + rec(rec(1-3))); 3 + rec(3 + rec(rec(-2))); 3 + rec(3 + 0); 3 + rec(3); Hence the infinite loop.

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Jonathan Eshetu very good, you got it.
u can also test it in the coding environment here.
nothing bad will happen. there will just be a message that there are too much recursions.
i did the test with _=4 and n=10000.

num IC - 3 months, 4 weeks ago

Log in to reply

@Num Ic Oh wow. I just used IDLE to play around and see what happened. I set a variable that increased 1 for ever recursion. and then made it stop at 20 so I could review the loop.

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Jonathan Eshetu yeah for local test, i used idle too. but here i use the brilliant coding environment.
have u seen that carsten proposed two webpages?
have u checked the community for coding problems, that are posted by the members?

num IC - 3 months, 4 weeks ago

Log in to reply

@Num Ic I've looked around here and there for problems posted by members, but everything is either WAY too easy or WAY too hard.

A website I just found out, that I'm going to use a lot now, is edabit.com. It has a bunch of different challenges anywhere from Very Easy -Expert, with a ton of different languages.

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Jonathan Eshetu thats a great hint ty

num IC - 3 months, 4 weeks ago

Log in to reply

@Num Ic I also didn't see the websites carsten proposed. Could you please send a link?

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Jonathan Eshetu @num IC this explanation was actually a bit off, as the pattern goes:

3 + rec(3)
3 + 3 + rec(rec(3-3))
3 + 3 + 0
6

or in some cases;

3 + rec(3 + rec(3))
3 + rec(3 + 3 + rec(rec(3-3)))
3 + rec(6)
3 + 3 + rec(rec(6-3)
3 + 3 + rec(rec(3))
3 + 3 + rec(3 + rec(rec(3-3)))
3 + 3 + rec(3)
3 + 3 + 3 + rec(rec(3-3))
3 + 3 + 3 + 0
9

But I'm assuming you see the pattern by now.

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Num Ic Sorry that it's cramped, I can't do line breaks for some reason. You don't need to read it, I just think I understand now.

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Jonathan Eshetu i do linebreaks by two spaces and then return. 4 spaces should create a linebreak too.
i had four spaces before the 4, but it seems not to work.
btw: u can test such things by creating a note.
but u can do it here too ;-) (if the others in this chat are annoyed, they will unsubscribe this chat)

num IC - 3 months, 4 weeks ago

Log in to reply

@Jonathan Eshetu you can just try this ;-) :

def rec(n):
    print(n)
    if n <= 0:
        return 0
    return 3 + rec(rec(n - 2))

N = 5
for i in range(1, N):
    print(i, rec(i))

the recursion depth is limited, so big input values will cause a problem even with _=3 and _=4.

task: create a short code to find the max recursion depth.

num IC - 3 months, 4 weeks ago

Log in to reply

@Num Ic Hm, what do you mean by recursion depth? Sorry if that's a stupid question...

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Jonathan Eshetu questions are rarely stupid. if the factorial function is called with the input 10, then it calls itself 10 times, if it is called with 100, then it calls itself 100 times. the recursion depth is how often a function calls itself until it finishes.
eg factorial 4:

remember the 4 and call f(3)  
    remember the 3 and call f(2)  
        remember the 2 and call f(1)
            return 1
        return the remembered 2 multiplied by 1 (=2) 
    return the remembered 3 multiplied by 2 (=6)
return the remembered 4 multiplied by 6 (=24)

-> recursion depth 4

num IC - 3 months, 4 weeks ago

Log in to reply

@Num Ic Ohhh, ok. That makes a ton more sense now. I'll do that program tmrw morning. :)

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Jonathan Eshetu can you solve this with python?
maybe this is better

num IC - 3 months, 4 weeks ago

Log in to reply

@Num Ic Well uhh....I already solved it intuition wise accidentally....

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Num Ic Now that sounds fun. Though, I'm a bit busy with schoolwork rn, so I'll make the recursion depth program and solve that problem when I get s'more work done.

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Jonathan Eshetu sure. schoolwork first.
this is a proposal for a coding environment: repl.it
this is for learning: realpython.com
(the 2nd seems to be similar to your edabit.com)

num IC - 3 months, 4 weeks ago

Log in to reply

I need to test my programming skills.

Jonathan Eshetu - 4 months ago

Log in to reply

i can sure propose something, but i would prefer if people use "please" when they ask for something.

num IC - 4 months ago

Log in to reply

Sorry about that.

I was a bit....impatient when I wrote that. Completely my fault. Could you please?

Jonathan Eshetu - 4 months ago

Log in to reply

@Mahdi Raza hello Mahdi Raza , you created a very nice animation in this daily problem: Sum These Segments. what tool can be used to create such an animation? or did you move the lines by hand, step-by-step?

num IC - 3 months, 4 weeks ago

Log in to reply

Hi, I have used Keynote. I grouped the lines and then rotated. Refer this if you have any more questions

Mahdi Raza - 3 months, 4 weeks ago

Log in to reply

this is great ty. i checked your pentagon. there you mentioned keynote. i thought that was only a kind of a powerpoint clone. but you are creating very impressive animations. ty for that and ty for the hint.

num IC - 3 months, 4 weeks ago

Log in to reply

@Num Ic Thank you, would like to see your animations too...

Mahdi Raza - 3 months, 4 weeks ago

Log in to reply

@num IC It was getting cramped earlier, so I'm just making a new post to continue our conversation.

1) I checked out repl.it, it seems pretty helpful, but realpython seems like basically pay to python.

2) Still working on those 2 problems by the way (smallest 10-digit number and recursion depth.) :)

3) I was thinking earlier, isn't there a much easier factorial function?

1
2
3
4
5
6
7
8
9
def factorial(n):
    nFac = 1
    for i in range(1, n+1):
        nFac *= i
    return nFac
# 5 => 120
# 7 => 5040
# 10 => 3628800
# 300 => 306057512216440636035370461297268629388588804173576999416776741259476533176716867465515291422477573349939147888701726368864263907759003154226842927906974559841225476930271954604008012215776252176854255965356903506788725264321896264299365204576448830388909753943489625436053225980776521270822437639449120128678675368305712293681943649956460498166450227716500185176546469340112226034729724066333258583506870150169794168850353752137554910289126407157154830282284937952636580145235233156936482233436799254594095276820608062232812387383880817049600000000000000000000000000000000000000000000000000000000000000000000000000 ;)

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

yeah. and it is faster, since a function call takes more time than a loop.
it is just used as a simple way to understand recursions.
you can also use carstens codes to understand recursions ;-)
ty, i didnt check realpython. i just saw that one did recommend it.
for recursion depth, a simple code is enough. just dont be affraid.

num IC - 3 months, 4 weeks ago

Log in to reply

Here's the program I used for the 10 digit problem:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Input
import itertools
import math
nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
for i in itertools.permutations(nums):
    if i[0] == 0:
        continue
    i = int(''.join(map(str, i)))
    if math.sqrt(i).is_integer():
        print(i)
        break

# Output
1026753849

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Jonathan Eshetu nice. i knew that was too easy for you, since you already used permutations. ;-)

num IC - 3 months, 4 weeks ago

Log in to reply

@Num Ic Thanks :D

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

And isn't the recursion depth infinite?

As for any number, it would keep subtracting _ until the number became <= 0, and the number could be infinitely large...

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Jonathan Eshetu in theory it is infinite. but that would create an endless loop. there is a limit.

num IC - 3 months, 4 weeks ago

Log in to reply

@Num Ic Ok, my mind is blown.

For starters, I edited the function a little bit, so that it measures how many times the function is called.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Input
a = [] # This is an array so we can print the values if needed
def rec(n):
    a.append(n)
    if n <= 0:
        return 0

    return 3 + rec(rec(n - 3))

for x in range(1, 50):
    print(x, "-", rec(x), len(a))
    a.clear()

# Output
1 - 3 3
2 - 3 3
3 - 3 3
4 - 6 7
5 - 6 7
6 - 6 7
7 - 9 15
8 - 9 15
9 - 9 15
10 - 12 31
11 - 12 31
12 - 12 31
13 - 15 63
14 - 15 63
15 - 15 63
16 - 18 127
17 - 18 127
18 - 18 127
19 - 21 255
20 - 21 255
21 - 21 255
22 - 24 511
23 - 24 511
24 - 24 511
25 - 27 1023
26 - 27 1023
27 - 27 1023
28 - 30 2047
29 - 30 2047
30 - 30 2047
31 - 33 4095
32 - 33 4095
33 - 33 4095
34 - 36 8191
35 - 36 8191
36 - 36 8191
37 - 39 16383
38 - 39 16383
39 - 39 16383
40 - 42 32767
41 - 42 32767
42 - 42 32767
43 - 45 65535
44 - 45 65535
45 - 45 65535
46 - 48 131071
47 - 48 131071
48 - 48 131071
49 - 51 262143

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Num Ic After analyzing:
1) Since it's steadily increasing, isn't the depth infinite?
2) This is crazy. If you add 1 to each of the depths, you end up with a very noticeable pattern.
4, 4, 4, 8, 8, 8, 16, 16, 16, 32, 32, 32, 64, 64, 64... Why would powers of 2 appear here?

Jonathan Eshetu - 3 months, 4 weeks ago

Log in to reply

@Jonathan Eshetu i have to think about the logic to understand why the powers of 2 occure here.
but there is a missunderstanding. my intention was not to check the depth of this particular function. (50 is much too low to test this one).
its more easy to use a simple function that just increases the given value.

num IC - 3 months, 4 weeks ago

Log in to reply

@Num Ic Oh, you want me to create a simple function and then test the recursion depth with another program?

Jonathan Eshetu - 3 months, 3 weeks ago

Log in to reply

@Jonathan Eshetu hm, no. just a small code, that continuously calls itself and then you run it and check the error message

num IC - 3 months, 3 weeks ago

Log in to reply

@Num Ic

1
2
3
4
5
6
7
8
9
a = 0
def letsBreakIDLE():
    global a
    a += 1
    print(a)
    letsBreakIDLE()

letsBreakIDLE()
# Output stops at 1012

Jonathan Eshetu - 3 months, 3 weeks ago

Log in to reply

@Jonathan Eshetu nice. mine stopped at 997 when i tried this in brilliant:

def rec(n):
    print(n)
    rec(n+1)

rec(1)

num IC - 3 months, 3 weeks ago

Log in to reply

@Num Ic Even in IDLE, the function starts to slow down at around 60.

Jonathan Eshetu - 3 months, 3 weeks ago

Log in to reply

@Jonathan Eshetu hm yeah it was just an idea. i thought it might be interesting for you to know how to check the limits of python (or any ide).
currently i feel a bit incapable bcs i am not able to express that intention clear enough.
have you found some interesting tasks on edabit.com?

num IC - 3 months, 3 weeks ago

Log in to reply

@Num Ic Sorry about this, I had my hands full of schoolwork last night.

Don't feel incapable, if anything my limited python vocab is stopping me from understanding.

I've just been doing easy tasks for now on edabit, but I've started switching a bit more to repl.it

Jonathan Eshetu - 3 months, 3 weeks ago

Log in to reply

@Jonathan Eshetu ok. i have tried none of them.
do you reccomend them? do you have questions?

num IC - 3 months, 3 weeks ago

Log in to reply

@Num Ic There was 1 problem, something like "create a stutter function that gets a parameter, and returns the first 2 letters, ..., the first 2 letters again, ..., and then the full word with a question mark.
Ex. stutter(python) -> py...py...python?
I have the idea, I just don't exactly know how to code it.

Jonathan Eshetu - 3 months, 3 weeks ago

Log in to reply

@Jonathan Eshetu t="hello"
print(t[:2]) what did u use to get the first 2 letters?

num IC - 3 months, 3 weeks ago

Log in to reply

@Num Ic That's the thing, I didn't know what to use. Thank you!

Jonathan Eshetu - 3 months, 3 weeks ago

Log in to reply

@Num Ic I thought [num:num] only worked on arrays.

Jonathan Eshetu - 3 months, 3 weeks ago

Log in to reply

@Jonathan Eshetu this works in brilliant:

t="hello"
print(t[:2],"...",t[:2],"...",t, sep='')

a string is an array, just filled with chars

num IC - 3 months, 3 weeks ago

Log in to reply

@Num Ic Ah, I didn't think about it that way. Completely forgot about [:] and sep. Thanks!

Jonathan Eshetu - 3 months, 3 weeks ago

Log in to reply

@Jonathan Eshetu yw. i had to google sep bcs i usually dont use it. its also possible to use a formated print, but i dont know how that works.

num IC - 3 months, 3 weeks ago

Log in to reply

this is a good idea to train using strings and dictionaries:
https://brilliant.org/problems/you-ninja-name/

num IC - 3 months, 3 weeks ago

Log in to reply

sorry this is so late.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
def ninjaToEnglish(phrase):
    engText = []
    ninjaDict = {"a": "ka","b": "u","c": "mi","d": "te","e": "ku","f": "lu","g": "ji","h": "ri","i": "ki","j": "zu","k": "me","l": "ta","m": "rin","n": "to","o": "mo","p": "no","q": "ke","r": "shi","s": "ari","t": "chi","u": "do","v": "ru","w": "mei","x": "na","u": "fu","z": "zi"," ": " ",}
    phrase = phrase.split('~')
    for i in phrase:
        for key, value in ninjaDict.items():
            if i == value:
                engText.append(key)
    engText = ''.join(engText)
    return engText

print(ninjaToEnglish("chi~ri~ku~ ~ka~to~ari~mei~ku~shi~ ~chi~mo~ ~chi~ri~ki~ari~ ~no~shi~mo~u~ta~ku~rin~ ~ki~ari~ ~ari~ki~na~ ~te~ki~ru~ki~te~ku~te~ ~u~fu~ ~ri~ka~ta~lu"))

#output: the answer to this problem is six divided by half (I almost put 3)

Jonathan Eshetu - 3 months, 3 weeks ago

Log in to reply

@Jonathan Eshetu nice

num IC - 3 months, 3 weeks ago

Log in to reply

@Num Ic thx

Jonathan Eshetu - 3 months, 3 weeks ago

Log in to reply

@Jonathan Eshetu what does this?: engText = ''.join(engText)
and ty: i was not aware that there is no direct access from value to key.
i assume that is why they created that reverse dict in the solution.

num IC - 3 months, 3 weeks ago

Log in to reply

@Num Ic changes it from ['e', 'x', 'a', 'm', 'p', 'l', 'e'] to 'example'

Jonathan Eshetu - 3 months, 3 weeks ago

Log in to reply

@Jonathan Eshetu cool trick. ty

num IC - 3 months, 3 weeks ago

Log in to reply

@Num Ic welcome.

Jonathan Eshetu - 3 months, 3 weeks ago

Log in to reply

@Jonathan Eshetu i would have used:
engText = ""
and then:
engText += key

but good to know how to convert an array into a string.

num IC - 3 months, 3 weeks ago

Log in to reply

@Num Ic true, i didn't think of that.

Jonathan Eshetu - 3 months, 3 weeks ago

Log in to reply

@Num Ic I had to do a bit of searching up, since I wasn't familiar with dictionaries.

Jonathan Eshetu - 3 months, 3 weeks ago

Log in to reply

@Jonathan Eshetu yeah thats where i struggled with the online course: i had no experience with python dictionaries.

num IC - 3 months, 3 weeks ago

Log in to reply

Hey @num IC, I finally made a one liner!

Basically, it takes a number, returns its divisors, the sum of its divisors, and if it's a perfect number (a number where the sum of its divisors equals itself) or not.

1
2
def perfectNumberCheck(n):
    print(n, "\n", "divisors:", ' '.join(map(str, [i for i in range(1, n) if n%i == 0] + [n])), "\n", "sum of divisors (aside from itself):", sum([i for i in range(1, n) if n%i == 0]), "\n", "Perfect number:", "True" if sum([i for i in range(1, n) if n%i == 0]) == n else "False", "\n", "\n")

Try it out!

Jonathan Eshetu - 3 months, 2 weeks ago

Log in to reply

very cool.
its possible to skip long lines by using \
and i know that for some ppl it is a challenge to solve problems in few lines, but it is more easy to read code if it is split into several commands.
and i m impressed: you already know more about how to use the print command than i do.
so i should try to catch up again ;-)

num IC - 3 months, 2 weeks ago

Log in to reply

I knew I could make the code a lot more compact if it was in several lines, but I wanted to see if I could do it in one, yknow?

Jonathan Eshetu - 3 months, 2 weeks ago

Log in to reply

@Jonathan Eshetu Here it is a bit..neater, because I assigned the divisors array so I wouldn't have to spam it.

1
def perfectNumberCheck(n): divisors = [i for i in range(1, n) if n%i == 0] + [n]; print(n, "\n", "divisors:", ' '.join(map(str, divisors)), "\n", "sum of divisors (aside from itself):", sum(divisors) - n, "\n", "Perfect number:", "True" if sum(divisors) - n == n else "False", "\n")

Jonathan Eshetu - 3 months, 2 weeks ago

Log in to reply

@Jonathan Eshetu this is great !! i wanted to say that repeating the same is not efficient, but this 2nd thing is very good

num IC - 3 months, 2 weeks ago

Log in to reply

@Num Ic Thank you! I appreciate it :)

Jonathan Eshetu - 3 months, 2 weeks ago

Log in to reply

@Num Ic Hey Num Ic, could you please give me a coding challenge? It can be on brilliant, or anything really. Thanks!

Jonathan Eshetu - 3 months, 2 weeks ago

Log in to reply

@Jonathan Eshetu hm, i had to find some.
i really recommend the corrected coursera page that i posted.
coursera learn python
that was one task i liked:
korovay
it has to return correct russian word for cow (korov, korova or korovy):
For a given number n <100, finish the phrase “Grazing in the meadow ...” with one of the possible continuation: “n cows”, “n cow”, “n cows”, correctly declining the word “cow”.

Input format
A natural number is entered.

Output format
The program should print the entered number n and one of the words: korov, korova or korovy. There must be exactly one space between the number and the word.

Note
If Russian is not your native language and you find it difficult to cope with this task, you can find a hint on declensions here: https://www.coursera.org/learn/python-osnovy-programmirovaniya/programming/rsYze/korovy/discussions/threads/-FJYlWcKEeiMwRLm6nkdwA .
"n коров" if 10 <n <20 or the last digit of n is one of 0, 5, 6, 7, 8, 9.
"n корова" if the last digit n == 1.
"n коровы" in all other cases.

num IC - 3 months, 2 weeks ago

Log in to reply

@Num Ic wait, there's no difference between "n cows" and "n cows"?

Jonathan Eshetu - 3 months, 2 weeks ago

Log in to reply

@Num Ic oh wait nvm.

Jonathan Eshetu - 3 months, 2 weeks ago

Log in to reply

@Num Ic it translated to english for some reason.

Jonathan Eshetu - 3 months, 2 weeks ago

Log in to reply

@Jonathan Eshetu ;-) yeah, the same happened to me when i translated the page.
its a double challenge to code, when the task is given in a foreign language ;-)
i saved some of the tasks, but i saved them translated to german not english ;-(

num IC - 3 months, 2 weeks ago

Log in to reply

@Percy Jackson you asked for sides to learn python.
i did the free course on this page: coursera.org
it is in russian, but i translated the pages (i ignored the videos)

a member here recommended edabit.com (it seems to be a free page to learn python).
other pages:
realpython.com (might be pay to use) repl.it (online coding environment)

num IC - 3 months, 2 weeks ago

Log in to reply

@Percy Jackson ty for showing your javascript code for the candy problem.
it helped me a lot to understand javascript.
i found a nice solution to change the speed.
if you want to see it, i can post it here.

num IC - 3 months, 2 weeks ago

Log in to reply

Ok, you can post it here. Thanks :)

Percy Jackson - 3 months, 2 weeks ago

Log in to reply

Thanks :)

Percy Jackson - 3 months, 2 weeks ago

Log in to reply

javascript:

var img1Load, img2Load;
var total = '';
var customColor, customWeight, customSpeed;
var linecolor, weight, speed;

function preload() {
  img1Load = loadImage('PicCandy.JPG');
  img2Load = loadImage('Colour.png');
}

function restar() {
  image(img1Load, 220, 200, 440, 400);
  lastFrame = frameCount;
  waitFrame = true;
  state = 0;
}

function setup() {
  createCanvas(650, 450);
  background('white');
  imageMode(CENTER);
  image(img1Load, 220, 200, 440, 400);
  image(img2Load, 535, 140, 160, 20);

  customColor = createSlider(0, 360, 0);
  customWeight = createSlider(2, 15, 5);
  customSpeed = createSlider(1, 120, 60);
  cButton = createButton("Restart");

  customColor.position(450, 100);
  customWeight.position(450, 210);
  customSpeed.position(450, 300);
  cButton.position(500, 380);
  cButton.mousePressed(restar);

  lastFrame = 0;
  waitFrame = true;
  state = 0;

  textAlign(CENTER);
  strokeWeight(5);
  noStroke();
  textSize(19);
  text('Path Color', 530, 100);
  text('Path Width', 535, 210);
  text('Animation Speed', 535, 300);

  textSize(15);
  text('Thin', 455, 250);
  text('Thick', 605, 250);
  text('Low', 605, 340);
  text('High', 455, 340);
}

function draw() {
  //frameCount = 0;

  linecolor = customColor.value();
  weight = customWeight.value();
  speed = customSpeed.value();

  textAlign(CENTER);
  strokeWeight(weight);
  noStroke();
  textSize(19);
  rect(0, 400, 500, 50);
  text('Total : ' + total, 250, 430);
  colorMode(HSB);
  stroke(360 - linecolor, 100, 100);
  colorMode(RGB);

  if (waitFrame) {
    if (frameCount >= lastFrame + speed) {
      waitFrame = false;
      lastFrame = frameCount;
    }
  } else {

    if (state <= 15) {
      state = state + 1;
      waitFrame = true;
    }

    if (state === 1) {
      line(200, 268, 358, 151);
      total = '10';
    }

    if (state === 2) {
      line(358, 151, 358, 268);
      total = '10 + 9';
    }

    if (state === 3) {
      line(358, 268, 200, 268);
      total = '10 + 9 + 7';
    }

    if (state === 4) {
      line(200, 268, 40, 385);
      total = '10 + 9 + 7 + 4';
    }

    if (state === 5) {
      line(40, 385, 40, 268);
      total = '10 + 9 + 7 + 4 + 4';
    }

    if (state === 6) {
      line(40, 268, 200, 268);
      total = '10 + 9 + 7 + 4 + 4 + 6';
    }

    if (state === 7) {
      line(200, 268, 200, 151);
      total = '10 + 9 + 7 + 4 + 4 + 6 + 4';
    }

    if (state === 8) {
      line(200, 151, 358, 151);
      total = '10 + 9 + 7 + 4 + 4 + 6 + 4 + 8';
    }

    if (state === 9) {
      line(358, 151, 358, 36);
      total = '10 + 9 + 7 + 4 + 4 + 6 + 4 + 8 + 6';
    }

    if (state === 10) {
      line(358, 36, 40, 36);
      total = '10 + 9 + 7 + 4 + 4 + 6 + 4 + 8 + 6 + 7';
    }

    if (state === 11) {
      line(40, 36, 40, 151);
      total = '10 + 9 + 7 + 4 + 4 + 6 + 4 + 8 + 6 + 7 + 5';
    }

    if (state === 12) {
      line(40, 151, 200, 151);
      total = '10 + 9 + 7 + 4 + 4 + 6 + 4 + 8 + 6 + 7 + 5 + 7';
    }

    if (state === 13) {
      line(200, 151, 358, 36);
      total = '10 + 9 + 7 + 4 + 4 + 6 + 4 + 8 + 6 + 7 + 5 + 7 + 7';
    }

    if (state === 14) {
      total = '84';
    }

  }

}

num IC - 3 months, 2 weeks ago

Log in to reply

@Num Ic Thanks for the code, it works :)

Percy Jackson - 3 months, 2 weeks ago

Log in to reply

I wish you success with your exams.

num IC - 3 months, 2 weeks ago

Log in to reply

@Num Ic Thanks :)

Percy Jackson - 3 months, 2 weeks ago

Log in to reply

@Percy Jackson @Jonathan Eshetu
i m not sure if i linked the correct coursera course.
this is the one i did: https://www.coursera.org/learn/python-osnovy-programmirovaniya/home/welcome

num IC - 3 months, 2 weeks ago

Log in to reply

@Mitch Connor
I have deleted my solution for the problem, but I apologize for the incorrect equation. I got them mixed up, which is completely my bad. Thanks for telling me!

Jonathan Eshetu - 3 months, 1 week ago

Log in to reply

Hey @num IC , I have a quick question, if you're here

Jonathan Eshetu - 2 months, 3 weeks ago

Log in to reply

hi. i m here now.
but since i still have to understand some of the lines from your cool code, i m not sure if i really still can help you ;-)

num IC - 2 months, 3 weeks ago

Log in to reply

haha, thanks ;-)

I can't stay for long, so sorry if i don't respond, but say I was making a text rpg in python

in this rpg, i plan to have an effects system, ex. an attack inflicting the opponent with burn, poison, freeze, etc. etc.

what would you say is the most efficient way to do this? the player has a class, so you can add attributes if necessary. here is the class code (done by me)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
class RPGclass:

      def __init__(self, strength, defense, agility, magic, gold, health, MaxMP, name, wins, EXP):
        self.atksDict = {}
        self.strength = strength
        self.defense = defense
        self.agility = agility
        self.magic = magic
        self.gold = gold
        self.health = health
        self.currenthealth = health
        self.MaxMP = MaxMP
        self.currentMP = MaxMP
        self.name = name
        self.wins = wins
        self.EXP = 0
        self.level = 0

      def add_atk(self, atk, str, cooldown=0, manacost=0, effects=None):
        self.atksDict[atk] = [str, cooldown, manacost, effects]




    Rogue = RPGclass(2, 1, 2, 0, 0, 90, 40, "Rogue", 0, 0) #edit strength, defense,agility, and magic here

    Warrior = RPGclass(3, 1, 1, 0, 0, 110, 20, "Warrior", 0, 0)

    Knight = RPGclass(2, 2, 1, 0, 0, 120, 30, "Knight", 0, 0)

    Mage = RPGclass(1, 1, 1, 3, 0, 100, 70, "Mage", 0, 0)

    Rogue.add_atk("Needles", [i for i in range(round(1/3*Rogue.strength + 2/3*Rogue.agility), round(2/3*Rogue.strength+Rogue.agility)+1)], 0, 0)



    Rogue.add_atk("Surprise Attack!", round(Rogue.strength+2*Rogue.agility), 5,0)

    Warrior.add_atk("Sword Strike", [i for i in range(round(Warrior.strength*0.75), round(Warrior.strength*1.5)+1)],0,0)

    Warrior.add_atk("Whirlwind", Warrior.strength*2, 7,0)

    Knight.add_atk("Shield Bash", [i for i in range(round(1/2*Knight.strength + 1/2*Knight.defense), round(2/3*Knight.strength+Knight.defense)+1)],0,0)

    Knight.add_atk("The More, the Stronger!", 0, 5,0)

    Mage.add_atk("Staff Strike", [i for i in range(round(Mage.strength*1.5), round(Mage.strength*2.6)+1)],0,0)

    Mage.add_atk("Fireball", [i for i in range(round(Mage.magic*1.5), round(Mage.magic*2)+1)], 3, 15, "Burned")

Jonathan Eshetu - 2 months, 3 weeks ago

Log in to reply

as you can see, i have effects in the attack setting, but how should i go about adding it in an actual battle? going through a bunch of if statements (if attack[2] =="Burned", if attack[2] == "Freezed", etc. etc.) making a dict to match effect name with effects? thank you in advance! I have to go now, so i'll respond tmrw morning!

Jonathan Eshetu - 2 months, 3 weeks ago

Log in to reply

@Jonathan Eshetu if they cause the same effect then you could use if attack[2] in ....
if the effects are different then a dict sounds like a good idea.

num IC - 2 months, 3 weeks ago

Log in to reply

@Jonathan Eshetu and i would add something like: "inflictedWith" and "inflictedTimer" to the character stats.

num IC - 2 months, 3 weeks ago

Log in to reply

@Num Ic You're obviously more advanced at this then me, lol
so this is all being done on repl.it (remember that), so if you have an account, I can invite you to the repl ;)
however, i'm not the owner, so i'll have to wait until the owner gets online.

Jonathan Eshetu - 2 months, 3 weeks ago

Log in to reply

@Num Ic plus, a lot of the other code was done by me and therefore isn't that clean, so not only this, any help with the rpg would be appreciated!

Jonathan Eshetu - 2 months, 3 weeks ago

Log in to reply

@Jonathan Eshetu i have no exp in creating a rpg, but i m glad when i can contribute some help

num IC - 2 months, 3 weeks ago

Log in to reply

@Num Ic it's not only rpg, you're just advanced in coding in general.
so would you like to join? i'd invite you some time tmrw, and we could really use the help lol. i understand if you say no ;-)

Jonathan Eshetu - 2 months, 3 weeks ago

Log in to reply

@Jonathan Eshetu oh, i love to join. its just that seeing you young guys doing all this cool stuff makes me feel i miss a lot that i should have done when i was younger.
i ll try to find some energy to create an repl acc.

num IC - 2 months, 3 weeks ago

Log in to reply

@Num Ic it's never too late :).
Life's sometimes that way, but who says you can't do all those things this year, or maybe more?

Plus, you don't have to worry about final exams ;-)

Jonathan Eshetu - 2 months, 2 weeks ago

Log in to reply

@Jonathan Eshetu yeah. i wish all i had to worry about were final exams. ;-)

num IC - 2 months, 2 weeks ago

Log in to reply

@Num Ic just respond whenever you make an account, and i'll ask the owner to add you asap.

Jonathan Eshetu - 2 months, 2 weeks ago

Log in to reply

@Jonathan Eshetu ty i ll do.
could you do me a favour and check what brilliant has written here? https://brilliant.org/daily-problems/circles-parallelogram/?from_notification=15616976#!/dispute-comments/36816/
i cant check because i dont have premium

num IC - 2 months, 2 weeks ago

Log in to reply

@Num Ic sorry this is late, they said: "Thank you for your feedback. I've updated the problem statement to reflect this.

I've marked this report as resolved."

Jonathan Eshetu - 2 months, 2 weeks ago

Log in to reply

@Jonathan Eshetu ty for checking. its not late. i was just curious bcs they updated the wording already some days ago, so i was wandering if there was more then just marking it as resolved. ty again

num IC - 2 months, 2 weeks ago

Log in to reply

@Num Ic yeah yeah, yw!
don't forget to tell me if you make a repl acc lol

Jonathan Eshetu - 2 months, 2 weeks ago

Log in to reply

i checked if your nice solutions runs in bril env.
i used that as input:

eq = "aaaa - bbb + cc - d = 8765"
leading0 = "false"

and it worked well. i tried this too:

eq = "aaaa-bbb+cc-d=8765"
leading0 = "false"

and got 0 solutions.

it does not matter for the designed purpose, but i assume u will process input data in the future too.

num IC - 2 months, 2 weeks ago

Log in to reply

Yeah, I set it to .split(" + "), .split(" - "), and .split(" = "), so that's why it does that. If I remove the spaces, it might count them as numbers...

Jonathan Eshetu - 2 months, 2 weeks ago

Log in to reply

@Jonathan Eshetu yeah input processing can be become very complicated. thats one reason why i'm so impressed by your code.

num IC - 2 months, 2 weeks ago

Log in to reply

@Num Ic Thank you, that really means a lot coming from you ;-)

Jonathan Eshetu - 2 months, 2 weeks ago

Log in to reply

@Paul Romero Bello sry for the deleted msg, i tried to get your mention id, to "invite" you to this note.
the 2 links in this note are very helpful. i found some more too. and i can help whenever you are ready to try some latex.
additional: an idea to post a solution without pictures would be:
51234
23451
12345
34512
45123

lol, the numbers where just cycling. i have not recognized that before.

num IC - 2 months ago

Log in to reply

You are very kind. Thank you :)

Paul Romero - 2 months ago

Log in to reply

you are very welcome.
first "challenge": copy the next line and send it as reply
\(\boxed{\LaTeX}\)

num IC - 2 months ago

Log in to reply

@Num Ic LaTeX\boxed{\LaTeX}

Paul Romero - 2 months ago

Log in to reply

@Paul Romero Cooool!!!! :)

Paul Romero - 2 months ago

Log in to reply

@Paul Romero great !!
voila, your first latex post :)
did you check how it works? or maybe you know it without reading the links.

num IC - 2 months ago

Log in to reply

@Num Ic Yeah, I realized how it works by myself. Now, I am taking notes from your post. I hope to post a solution for tomorrows problem, if I get it right, of course!!!

Paul Romero - 2 months ago

Log in to reply

@Paul Romero you are very good. do you know how to post a picture?

num IC - 2 months ago

Log in to reply

@Num Ic wait, i'm a bit confused on LaTeX\boxed{\LaTeX}

how exactly does it work?

Jonathan Eshetu - 2 months ago

Log in to reply

@Num Ic ohhh, wait I think I got it

so what if I...

LaTeX\textbf{\LaTeX}

Jonathan Eshetu - 2 months ago

Log in to reply

@Jonathan Eshetu Nice!

Jonathan Eshetu - 2 months ago

Log in to reply

@Jonathan Eshetu abcdefghija_{b_{c_{d_{e_{f_{g_{h_{i_{j}}}}}}}}}

Jonathan Eshetu - 2 months ago

Log in to reply

@Jonathan Eshetu Amazing!!!

Paul Romero - 2 months ago

Log in to reply

@Paul Romero Thank you!

Jonathan Eshetu - 2 months ago

Log in to reply

@Jonathan Eshetu very good. can you do this?: upmiddlelow ^{\text {up}} \text{middle} _{\text {low}}

num IC - 2 months ago

Log in to reply

@Num Ic hm....upmiddlelow{up}^middle_{low} ?

Jonathan Eshetu - 2 months ago

Log in to reply

@Num Ic oh no, that's not it

Jonathan Eshetu - 2 months ago

Log in to reply

@Num Ic upmiddlelow ^{up}middle_{low}

Jonathan Eshetu - 2 months ago

Log in to reply

@Num Ic got it! sorry for the 4 pings, lol

Jonathan Eshetu - 2 months ago

Log in to reply

@Num Ic highesthigherhighmiddlelowlowerlowest ^{ ^{ ^{highest_{higher_{high}}}}}middle_{low_{lower_{lowest}}}

Jonathan Eshetu - 2 months ago

Log in to reply

@Jonathan Eshetu i have to try that highesthigherhighmiddlelowlowerlowest ^{ ^{ ^{highest_{higher_{high}}}}}middle_{low_{lower_{lowest}}}

num IC - 2 months ago

Log in to reply

@Jonathan Eshetu very nice. ty for that idea.
i don't mind the pings. i enjoy the interaction with you two.
@Paul Romero Bello please feel free to try it too.
if you don't want to get pings from this note, then you can click "unsubscribe", but i'm not sure what kind of notifications you will still get then.

num IC - 2 months ago

Log in to reply

maybe you want to use this. just an alternative to using percy's ;-)
i'm still curious. i assume a mac has a screenshot function?
else you might have something similar like snip&sketch:
when the "print" button is pressed, it offers some screen capture options.

num IC - 1 month, 4 weeks ago

Log in to reply

i don't have a mac, but the web says shift-command-3 create a screenshot.
u said u use a pc-keyboard, so i assume the command key is different from the funktion key. is it?

num IC - 1 month, 4 weeks ago

Log in to reply

Thanks for the link. The way I interpreted it was this: take any group of two students, there are 60/2=30 and there are 60 x 3 = 180 possible answers of which 60 x 2 =120 correct whatever the distribution. 60 answers are either all right, all wrong, or a combination of right and wrong. Person A could get Q1 right, and person B could get Q2 right. That's 2 questions right between 2 students. Or, A and B both got Q1 right but C and D got Q2 right. Or, if person A got Q1 right, B got Q2 right, and C got Q3 right, then D could have gotten Q1 or Q2 right or even Q3. I'm probably making too much out of this.

Joe Byrne - 2 months ago

Log in to reply

i just copy the statement, so it's more easy to compare.
"During an examination, 60 students had to answer 3 questions. After the examination, it's shown that for any two students, there is always at least 1 question which both students could solve."

num IC - 2 months ago

Log in to reply

it deprnds on the original wording but 60/2 is dividing the 60 students into groups of 2. but any two students would be 60*59/2 (combinatorics: pick 2 out of 60).
so this is much more than 30.

regarding the 1 question that both could solve. the wording indicates that both had the same question correct.

and as i said: the total number of questions is not stated. it could be the 3 same questions for all 60 students, but it could be more depending on the conditions of the problem.

the problem like you described it sounds more like:
60 students are divided into groups of 2.
each group had to answer 3 questions. both students answered individually.
every student gave at least one correct answer.

num IC - 2 months ago

Log in to reply

i was used to program in basic and c, but python is very nice.
i'm still on my way to understand how to use python-goodies like range and permutation.
but please feel free to ask questions regarding coding. it would be a pleasure for me to help you.

num IC - 2 months ago

Log in to reply

Thank you. Long ago (30 years) I used Fortran, Watfive, Pascal and Pascal took the lead. I got into a lot of Finite Element modeling with programming but quickly canned programs came on the scene in the form of software. So, I drifted away from programming and relied on software. But I'm impressed with the flexibility Python offers and want to learn it. Been doing a little here and there but get lost in the goodies (permutations and other libraries). I'll be sure to take you up on that with questions as they arise. Thanks again!

Joe Byrne - 2 months ago

Log in to reply

@Joe Byrne nice i used pascal too. i have seen fortran but never used it. is/was it fun to work with it?
i dont know watfive. i will search that.
you said you'r a bridge engineer. that sounds very interesting.

num IC - 2 months ago

Log in to reply

@Num Ic Watfiv had some additional features over Fortran but as Fortran indicates "formula translation" was its main feature. With advent of Pascal working with arrays took on new meaning. Bridges are fun because they encompass so many aspects of civil engineering, structural, hydraulic, highway, geotechnical and it all has to be designed around those criteria. Kind of like a puzzle with constraints.

Joe Byrne - 2 months ago

Log in to reply

@Joe Byrne i could find some fortran code samples. i'm glad that i could mainly understand them.
fortran whatF iv was harder to find, they looked a bit like assembler code.

num IC - 1 month, 3 weeks ago

Log in to reply

Thank you! I didn't even consider that there could be more than 180 questions. Just assumed they were the same 3 questions.

Joe Byrne - 2 months ago

Log in to reply

hm i assume 180 is the maximum if all student get different questions.
(there might be more but that should be mentioned like: ... had to answer 3 questions out of a set of questions.)
my first assumption was: all students get the same 3 questions.
i still assume this is the idea. but i have no idea what the question behind that setting is.

is this the original wording or is it just a draft for a challenge that you prepare?

num IC - 2 months ago

Log in to reply

It's the actual wording of a problem in the challenges community I believe under logic. The writer intended for the groups of two to get the same question right. But I thought there could be different interpretations.

Joe Byrne - 2 months ago

Log in to reply

@Joe Byrne ok nice. can you post a link here?
just use this without the blanks: [ some text ] ( html )

num IC - 2 months ago

Log in to reply

@Num Ic https://brilliant.org/problems/during-an-examination/

Joe Byrne - 2 months ago

Log in to reply

@Joe Byrne Hahaha, I got that wrong actually. I took the second point literally, when I should be doing 60 x 2 / 3 = 40.

Saya Suka - 2 months ago

Log in to reply

@Joe Byrne that was a nice problem. ty for showing it.

num IC - 2 months ago

Log in to reply

@Num Ic You're welcome.

Joe Byrne - 2 months ago

Log in to reply

"there is always at least 1 question which both students could solve."
--> implies that each student had at least 1 question solved.
--> if even one of them only scored 1/3, then that particular question must be solved by 59 others to make this claim true. We can see this in just a group of three, let ABC be the students and 123 the questions. Say q1 is the easiest one, so average students A and B could only manage that one. But even when brilliant C solved the other difficult two, but made careless mistake / ran out of time on q1, the claim will be invalid (A1, B1, C23).
--> if there are no 'easy' question which is scored by ALL the students, then all 60 must have solved AT LEAST 2 questions each.

Saya Suka - 2 months ago

Log in to reply

Thanks! I knew you'd make sense of this one. You are both a logician and mathematician.

Joe Byrne - 2 months ago

Log in to reply

Thank you, Joe, but that compliment is too high for me. I am still struggling when confronted with questions under category group theory. Too much lines and nodes than I can handle. And sorry I didn't think deeper than taking it as the 60 are just the usual class of hs students answering the same 3 questions. Perhaps the assumptions brought along from Three Questions problem we just had around Xmas.

Saya Suka - 2 months ago

Log in to reply

@Saya Suka I liked that problem around Xmas but then there was more information to give a certain exactness. My approach is always to flesh out the knowns so when confronted with abstractions I'm in unchartered territory.

Joe Byrne - 2 months ago

Log in to reply

if you love math then you might like this question: Minimum value of equation - Exam Edition
i got scrambled so i used wolfram alpha to solve it.

num IC - 2 months ago

Log in to reply

regarding 'beating a dead horse': hint: each char is coded as 2 digit number.
meaning: to waste effort on something when there is no chance of succeeding.
(beat a dead horse)
(i assume he wants to say that there is no benefit in discussing the different ways of solving the challenges. - in my opinion the expression does not fit here very well.)
in old times some riders did beat a horse to make it run faster, but if the horse is already done then this will have no effect.

num IC - 1 month ago

Log in to reply

Expression means "We've discussed this so much and in so many ways but aren't making any progress." I value different approaches and don't understand why people think they have the ultimate solution. It's like asking, "who's better - the republican or democratic nominee? Obviously it depends on what you value. So, I'm advocating that all approaches that yield the correct answer are valuable. The lengthy one that experts find redundant appeals to the person who lacks that knowledge to solve. The programmer who has solved many cryptograms and is honing his programming skills is saving time but providing knowledge to those who don't know programming. Etc.

Joe Byrne - 1 month ago

Log in to reply

@Joe Byrne good point. i assumed by 'beating a dead horse' you meant that that discussion has no positive effect.
my hope is that the discussion helps the critic to understand that there is a value in presenting different solutions (even coded ;-).

num IC - 1 month ago

Log in to reply

i can tell you how the first coding was done, but i assume you want to try it by yourself first.

num IC - 1 month ago

Log in to reply

Thanks, num IC! For the horse proverbs explanation and the hint, but still I'm getting no progress. I don't understand 2 parts there, one is the many 7 there (though your reply had an almost balanced quantity of 6 & 7), and the other is why there are abcd included there too.

Saya Suka - 1 month ago

Log in to reply

@Saya Suka 67736c6876 2068766576 6d68206b6 66f6f767720 626c66207a 6f686c206c 7575206769 7a78702072 20687676

Jason Gomez - 1 month ago

Log in to reply