Computer Science, asked by anindyaadhikari13, 3 months ago

Python Question.

Display the following series.
1 2 2 1 1 2 2 1 1 2 2 1.....N terms using for loop.

Restrictions:
1. Not to use any conditional construct inside loop like if-else-elif.
2. Only 1 variable can be printed.
3. Not to use more than 1 loop.
4. Not to use arrays/lists etc.

Take your time and solve it. Please don't post irrelevant answers.


Input:
Enter n - 5

Output:
1 2 2 1 1​

Answers

Answered by pjena5063
1

Answer:

Create a web page and set its Title as 'My Classmates'.

Set the top margin of the web page to 75.

Set Table border Size to 3 pixels and border color to 'Green'.

Table Height should be 250 pixels and width should be 500

My Classmates

pixels.

Align the table in center of the web page.

Create 5 columns in the table named as S.No, Name, Birthday, E-mail ID and Phone No.

Create five rows in the table and enter records of your five classmates.

Set the background colour and border colour of the heading row to 'Pink' and 'Blue' respectively.

Set CellPadding attribute of the table to 5.

Set CellSpacing property of the table to 5.

Answered by Anonymous
1

Answer:

Restrictions:

1. Not to use any conditional construct inside loop like if-else-elif.

2. Only 1 variable can be printed.

3. Not to use more than 1 loop.

4. Not to use arrays/lists etc.

Similar questions