Day 034 - Project 34 : Pretty Printing E-Mail Spammer

If you have any questions, comments or issues with this project please post them here!

1 Like

There is no code to fix in the ā€œFix My Codeā€ section.

Also, the Common Errors section has one more error. index is written as Index. Just FYI

Thank you so much @nomad. We appreciate users finding these errors. We will get that updated.

In Common Errors the Answer it says we need to insert ā€œcounter += 1ā€ but dont need, if put this variable when run program to show the emailā€™s - (3)

In Fix My Code really need the variable counter = 1 before de for, but in the common errors are saying:

Thatā€™s the answer in common errors

image

Hey, @Klynks welcome to the forums!

Can you please provide your whole code or a link to your repl? Just by the error you are trying to add 1 to the var counter before you assigned a value to it before.

1 Like

Hi @Klynks thanks for updating your post with the screenshot.

So are you saying that the answer suggests using counter += 1 but isnā€™t necessary because counter isnā€™t used anywhere else in the program?

1 Like

Or is it to insert the ā€œcounterā€ before the ā€œforā€? because if it was the intention, it should be in the answer, right?

1 Like

Iā€™m still struggling to understand here. The screenshot didnā€™t show the answer.

Iā€™ve gone into #100-days-of-code for Day 34 and this is the answer provided:

It makes no mention of counter because counter does not impact the program working / not working at all. It is not used.

The problem is with the for loop which is missing the range keyword.

1 Like

so try to see the e-mailā€™s pressing 3, the program not run correctly if dont put the counter before de for loop

if the counter in common errors is not used, donā€™t need to put in the code to try to fix?

1 Like

When you copy the code into your Repl and press run do you see this error?

image

sure, and now take de answer and put in the code, run the program and add some emailā€™s, then try pressing to view the emails with 3 - view emails and tell me if the program will display the emails

to fix that: or remove the counter += 1 in the code to fix , or need to put counter = 1 before the for loop, the program will not display the counter, but it will not cause the error. understand ?

In the Next Step: Fix My Code we need to use de counter, thatā€™s what proposing to fix right? but in the common erros what proposing to fix is the range() , right?

Got it. Thanks for explaining.

image

Once the answer is added and I typed in 3 emails I then selected option 3 and the above error was displayed. This is because the second Index inside the square brackets should not have a capital letter. Once I fixed this the next error appears:

image

There is no need to have the counter += 1 line of code. If you remove it the code works.

Iā€™ll ask for an update on this project so that the counter +=1 line is removed.

1 Like

sorry for that, iā€™m not programmer in woodworker from brazil and my english is bad, but iā€™m happy i find some error

2 Likes

No problem at all. You found an error! Thank you for explaining and I hope that you are enjoying the rest of the #100-days-of-code experience so far!

1 Like

i find another error but know in the solution of the day challenge image

if the email list is empty or a value of ā€œmaxā€ is > of the email size, an error will be reported.

need to len the list of email. I suffered to understand this, donā€™t hate me :laughing:

thats maybe the correct answer for def spam(max) ?

Try to spam without any email added and the if&else, just with the answer code for day challenge

Created spam emails :e-mail: with ā€˜pretty printing.ā€™ Donā€™t worry. Itā€™s fake.

https://replit.com/@JackAdem/Day-034-Project-34-Pretty-Printing-E-Mail-Spammer?v=1

Day 34 of #Replit100DaysOfCode #100DaysOfCode.

1 Like

Similar to day 33 it seems like the fix my code solution is missing a critical part. It would not run for me if I didnā€™t add the counter = 0 before the for loop.

I experienced the same issue but I thought we didnā€™t need a counter because of the change in the way we were countingā€¦

Hey @anrowan!

Can you provide your code so we can take a closer look at the problem?

1 Like