Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
289931d
Update if.md and loops.md
georgerahul24 Dec 30, 2020
6f1d882
Update if.md and loops.md
georgerahul24 Dec 30, 2020
9181d7a
Fixed Typo
georgerahul24 Jan 1, 2021
d5cf490
Removed unnecessary comments in the programmes
georgerahul24 Jan 1, 2021
848b0f3
Merge branch 'Akuli:master' into master
georgerahul24 Jul 1, 2021
33049e1
Update basics/loops.md
georgerahul24 Jul 13, 2021
a509a8e
Update basics/loops.md
georgerahul24 Jul 13, 2021
8fd60e4
Update basics/answers.md
georgerahul24 Jul 13, 2021
1eeda48
I have made the necessary changes as requested
georgerahul24 Jul 13, 2021
2ce1e7d
Update LICENSE
georgerahul24 Jul 13, 2021
7a93d2a
Update basics/loops.md
georgerahul24 Jul 13, 2021
39f94f5
Update basics/loops.md
georgerahul24 Jul 13, 2021
546f769
Update basics/handy-stuff-strings.md
georgerahul24 Jul 13, 2021
afafcdb
Update basics/answers.md
georgerahul24 Jul 13, 2021
9f35e3a
updated handy-stuff-strings.md
georgerahul24 Jul 13, 2021
e69aad0
Merge remote-tracking branch 'origin/master'
georgerahul24 Jul 13, 2021
ea0d4e6
Update basics/answers.md
georgerahul24 Jul 13, 2021
69e62b3
updated handy-stuff-strings.md
georgerahul24 Jul 13, 2021
34693ce
Merge branch 'master' of https://github.com/georgerahul24/python-tuto…
georgerahul24 Jul 13, 2021
b2e23df
updated handy-stuff-strings.md
georgerahul24 Jul 13, 2021
7e79089
Update basics/answers.md
georgerahul24 Jul 30, 2021
8cbe80f
Update basics/answers.md
georgerahul24 Jul 30, 2021
0e407c3
Update basics/answers.md
georgerahul24 Jul 30, 2021
228c862
Update basics/answers.md
georgerahul24 Jul 30, 2021
ea2f5f7
Update basics/answers.md
georgerahul24 Jul 30, 2021
b9ef729
Update basics/answers.md
georgerahul24 Jul 30, 2021
f8549e8
Update basics/answers.md
georgerahul24 Jul 30, 2021
985a52f
Update basics/handy-stuff-strings.md
georgerahul24 Jul 30, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update if.md and loops.md
  • Loading branch information
georgerahul24 committed Dec 30, 2020
commit 6f1d88287388cdf81f96a290dadaab4071657791
10 changes: 9 additions & 1 deletion basics/answers.md
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,15 @@ isn't exactly like mine but it works just fine it's ok, and you can
print(column,end=" ") # this is where the number is printed into rows
Comment thread
georgerahul24 marked this conversation as resolved.
Outdated
print()#creates a new line for the next row
```

6. The idea is more or less same as in the above question.
```python
rows=int(input("Type the number of rows needed:"))#gets the number of rows from the user

for row in range(1, rows + 2): #finds the row from rows' variable
for column in range(row,rows+1, 1): # this is actually the column where a number has to be added
print(column, end=' ')# this is where the number is printed into rows
print()#creates a new line for the next row
```

## Trey Hunner: zip and enumerate

Expand Down
7 changes: 7 additions & 0 deletions basics/loops.md
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,13 @@ while True:
1 2 3 4 <br>
1 2 3 4 5 <br>
Comment thread
georgerahul24 marked this conversation as resolved.
Outdated

6. Make a programme to get a pyramid like shown in the OUTPUT section where user can type the number of rows needed

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
6. Make a programme to get a pyramid like shown in the OUTPUT section where user can type the number of rows needed
6. Modify your program from the previous exercise to print this instead:

>**OUTPUT** when rows is equal to 5<br>
1 2 3 4 5 <br>
2 3 4 5 <br>
3 4 5 <br>
4 5 <br>
5 <br>
The answers are [here](answers.md#loops).

***
Expand Down