From a book that makes the programmer's way of thinking interesting (Python)

Tutorials are also decent To be able to program by myself I'm recommending it to my goal, so here instead of a memorandum I will leave it.

I'm sure you made a mistake, so I'm looking forward to pointing out. (I hope there are people watching)

Countdown and countup Problem: Consider an expression that you write in the code below. This program displays the numbers from 5 to 1 one by one on each line. ―――――――――――――――――――――――― for (int row = 1; row <= 5; row++) { cout << expression << "\n"; }

――――――――――――――――――――――――

Your answer

test.py


w = 5
while w > 0:
    print(w)
    w -= 1

・ ・ ・
5
4
3
2
1

As mentioned above, this problem was a simplified sub-problem of displaying a square with the original hash symbol, so it will continue next time.

Recommended Posts

From a book that makes the programmer's way of thinking interesting (Python)
Programmer's way of thinking is from XX book (Python)
Programmer's way of thinking is from XX book (Python)
From a book that programmers can learn (Python): Find the mode
From a book that programmers can learn ... (Python): Review of arrays
From a book that programmers can learn ... (Python): Pointer
From a book that programmers can learn (Python): Decoding messages
From a book that programmers can learn (Python): Statistical processing-deviation value
From a book that programmers can learn (Python): Conditional search (maximum value)
From a book that programmers can learn: Verification of rune checksum (fixed length)
From a book that programmers can learn (Python): Class declaration (public / private, etc.)
[Python] A program that counts the number of valleys
Python points from the perspective of a C programmer
The attitude that programmers should have (The Zen of Python)
[Python] A program that compares the positions of kangaroos.
A python script that gets the number of jobs for a specified condition from indeed.com
Different from the import type of python. from A import B meaning
A Python script that compares the contents of two directories
A library that monitors the life and death of other machines by pinging from Python
Existence from the viewpoint of Python
A Python script that allows you to check the status of the server from your browser
A formula that simply calculates the age from the date of birth
[Python] Get the update date of a news article from HTML
A function that measures the processing time of a method in python
From a book that programmers can learn ... Collect small problem parts
[python] A note that started to understand the behavior of matplotlib.pyplot
The story of making a module that skips mail with python
[Python] A program that rotates the contents of the list to the left
Learning notes from the beginning of Python 1
[python] [meta] Is the type of python a type?
The story of blackjack A processing (python)
Learning notes from the beginning of Python 2
[Python] A program that rounds the score
[Python] A program that calculates the number of chocolate segments that meet the conditions
[Python] A program that calculates the number of socks to be paired
Extract lines that match the conditions from a text file with python
Find out the name of the method that called it from the method that is python
[Python] Note: A self-made function that finds the area of the normal distribution
Get the contents of git diff from python
Get the caller of a function in Python
A memorandum of calling Python from Common Lisp
Around the authentication of PyDrive2, a package that operates Google Drive with Python
Make a copy of the list in Python
A note about the python version of python virtualenv
"Python Kit" that calls a Python script from Swift
[Python] A program that calculates the number of updates of the highest and lowest records
[Python] A rough understanding of the logging module
Output in the form of a python array
A discussion of the strengths and weaknesses of Python
A python script that generates a sample dataset for checking the operation of a classification tree
Get the value of a specific key in a list from the dictionary type in the list with Python
[Python] A program that finds the shortest number of steps in a game that crosses clouds
A memo that implements the job of loading a GCS file into BigQuery in Python
A program that summarizes the transaction history csv data of SBI SECURITIES stocks [Python3]
From a book that programmers can learn: Converting characters that represent numbers to integer types
[Python / C] I made a device that wirelessly scrolls the screen of a PC remotely.
Easy way to check the source of Python modules
The story of launching a Minecraft server from Discord
A story that reduces the effort of operation / maintenance
The wall of changing the Django service from Python 2.7 to Python 3
Calculate volume from the two-dimensional structure of a compound