Error in progrem

I am facing some error can you please take a look

Hi @satishkumarcse1995,

Mixing tabs and spaces can also result in indentation error. One of the possible solution is to avoid such error is to configure you nano editor so that whenever you press tab, it will convert the tabs into spaces and you can define the number spaces you want on each tab.

To do that -
Open /etc/nanorc

sudo nano /etc/nanorc

and add the below line -

set tabsize 4
set tabstospaces

and save the file.

Keep the number of spaces same for all the code block. If you are using 3 spaces then use 3 spaces everywhere and if you are using four spaces then use four spaces everywhere in your code.

Do let me know in case you need any other information.

1 Like