C1 w1 q9 edit two letters


Where am I wrong is refered several other Topics created by others but
If allow switch then add switch the number of output become 128 instead of desired output 129

1 Like

@Mubsi

1 Like

Hi @FIJAZ_MOHAMMED ,

Please share some more details. The information you provided isn’t enough to answer your question. Please provide steps you implemented. We would help to correct that.

Regards,
Harsh Der.

1 Like

@harshder03

(Solution code removed, as posting it publicly is against the honour code of this community, regardless if it is correct or not)

1 Like

Hi @harshder03,

Please know, you are not allowed to ask for learners to share their implementation or code in public threads. Please start a direct message with them when you have to look at their code.

Ask them to share error messages publicly.

@FIJAZ_MOHAMMED, I have removed the code you shared as sharing it publicly is against the honour code of this community.

Best,
Mubsi

2 Likes

@Mubsi sorry about that . the issue still not resolved

if i tried to use allow switch on the edict one letter the error showing
input word at
edit_one_l
[‘a’, ‘aa’, ‘aat’, ‘ab’, ‘abt’, ‘ac’, ‘act’, ‘ad’, ‘adt’, ‘ae’, ‘aet’, ‘af’, ‘aft’, ‘ag’, ‘agt’, ‘ah’, ‘aht’, ‘ai’, ‘ait’, ‘aj’, ‘ajt’, ‘ak’, ‘akt’, ‘al’, ‘alt’, ‘am’, ‘amt’, ‘an’, ‘ant’, ‘ao’, ‘aot’, ‘ap’, ‘apt’, ‘aq’, ‘aqt’, ‘ar’, ‘art’, ‘as’, ‘ast’, ‘ata’, ‘atb’, ‘atc’, ‘atd’, ‘ate’, ‘atf’, ‘atg’, ‘ath’, ‘ati’, ‘atj’, ‘atk’, ‘atl’, ‘atm’, ‘atn’, ‘ato’, ‘atp’, ‘atq’, ‘atr’, ‘ats’, ‘att’, ‘atu’, ‘atv’, ‘atw’, ‘atx’, ‘aty’, ‘atz’, ‘au’, ‘aut’, ‘av’, ‘avt’, ‘aw’, ‘awt’, ‘ax’, ‘axt’, ‘ay’, ‘ayt’, ‘az’, ‘azt’, ‘bat’, ‘bt’, ‘cat’, ‘ct’, ‘dat’, ‘dt’, ‘eat’, ‘et’, ‘fat’, ‘ft’, ‘gat’, ‘gt’, ‘hat’, ‘ht’, ‘iat’, ‘it’, ‘jat’, ‘jt’, ‘kat’, ‘kt’, ‘lat’, ‘lt’, ‘mat’, ‘mt’, ‘nat’, ‘nt’, ‘oat’, ‘ot’, ‘pat’, ‘pt’, ‘qat’, ‘qt’, ‘rat’, ‘rt’, ‘sat’, ‘st’, ‘t’, ‘tat’, ‘tt’, ‘uat’, ‘ut’, ‘vat’, ‘vt’, ‘wat’, ‘wt’, ‘xat’, ‘xt’, ‘yat’, ‘yt’, ‘zat’, ‘zt’]

The type of the returned object should be a set <class ‘set’>
Number of outputs from edit_one_letter(‘at’) is 128

@Mubsi please help me to figure it out where am i wrong

1 Like

@Mubsi

1 Like

I am facing the same problem. My function “edit_two_letters” passes 18 of 20 tests, and I can´t find the problem.

Could you help me?

2 Likes

You have to exclude blank sets being returned by ‘edit_one_letter’. For referenc, look at the ‘Delete Edit’ section of the lecture notebook C2_W1_lecture_nb_02_candidates_from_edits.

1 Like

By empty sets , Do you mean ’ ’ in the output of edit_one_letter set? If i remove ’ ’ in the set , iam getting “TypeError: ‘set’ object is not subscriptable”

1 Like

Had same (or similar issue). One hint fixing it — don’t forget about allow_switches param.

1 Like

Do you find the solution? I’m also facing same issue.

1 Like

I am facing the same issue. Anyone can help?
image

The output and expected output are the same though.

Anyone can help?

2 Likes

折腾了很久终于发现了,是没考虑 allow_switches参数的影响

1 Like

考虑allow_switches,应该就好了

1 Like

请检查allow_switches 为False的的情况,是否正确执行了代码

1 Like