OpenLLM-France/wikimedia huggingface dataset:
# Programming Fundamentals/Loops/For Loops

A for loop is a control flow statement for specifying iteration, which allows code to be executed repeatedly based on given parameters. For loops are typically used when the number of iterations is known before entering the loop. A for loop can be thought of as shorthand for a while loop which increments and tests a loop variable. This activity introduces for loops. This activity will help you understand how to use for loops in a program.

## Objectives

* Understand for loop concepts.
* Understand how for loops are specified in a program.
* Understand the difference between while loops and for loops and when to use each one.
* Single-step through a program to observe for loop execution.

## Prerequisites

Learners should already be familiar with while loops.

## Introduction

Review the flowchart example on the right.

### Questions

* What flowcharting symbol is used to indicate a for loop?
* How are for loops structured?
* What is the difference between a while loop and a for loop?
* When would you want to use a while loop vs. a for loop?

## Activity

With a partner, perform the following:
* Using a visual programming language, create a program similar to the flowchart on the right based on the following steps.
* Start by creating a for loop that counts from 1 to 5 by 1.
* Save the program.
* Test the program to verify that it works correctly.
* Modify the program to count from 1 to 10 by 1.
* Modify the program to count from 5 to 10 by 1.
* Modify the program to count from 0 to 10 by 2.
* Trade places, so that both partners have an opportunity to "drive" the visual programming environment.
* Modify the program to count from any start value the user enters to 10 by 1.
* Modify the program to count from any start value the user enters to any stop value the user enters by 1.
* Modify the program to count from any start value the user enters to any stop value the user enters by any increment value the user enters.
* Change the environment to use a slow run speed and/or step through the program one shape at a time.
* Working together, create a list of changes that might be made to use do loops in programs you've already written. What parts could be repeated and how would the loop terminate?

## Applications

* Identify specific steps which must be followed when creating a program using for loops.
* Discuss your activity experience with your classmates. What surprised you? What have you learned that you can apply to your own school or work environment?
# Programming Fundamentals/Loops/Fortran
## Try It

Copy and paste the code above into one of the following free online development environments or use your own Fortran compiler / interpreter / IDE.
* CodeChef
* GDB Online
* Ideone
* RexTester
* TutorialsPoint

## See Also

* TutorialsPoint: Fortran
* Fortran90.org: Best Practices
# Programming Fundamentals/Loops/Java
## Try It

Copy and paste the code above into one of the following free online development environments or use your own Java compiler / interpreter / IDE.
* CodeChef
* GDB Online
* Ideone
* InterviewBit
* paiza.IO
* PythonTutor
* repl.it
* TutorialsPoint

## See Also

* Wikibooks: Java Programming
# Programming Fundamentals/Loops/PHP
## Try It

Copy and paste the code above into one of the following free online development environments or use your own PHP compiler / interpreter / IDE.
* CodeChef
* GDB Online
* Ideone
* Online PHP
* paiza.IO
* repl.it
* W3Schools

## See Also

* Wikibooks: PHP Programming
# Programming Fundamentals/Loops/Flowchart
## Try It
### Free Online Flowchart Tools

* Diagramo
* Draw.io
* Creately

### Free Downloadable Flowchart IDEs

* Flowgorithm
* LARP
* RAPTOR
* Visual Logic

## See Also

* MathsIsFun: Conversion of Temperature
* Flowgorithm
* Raptor (programming)
# Matrix/K^n to K^m/Linear mapping/Example

The mapping
    $K^{n}\longrightarrow K^{m},{\begin{pmatrix}s_{1}\\\vdots \\s_{n}\end{pmatrix}}\longmapsto M{\begin{pmatrix}s_{1}\\\vdots \\s_{n}\end{pmatrix}}={\begin{pmatrix}\sum _{j=1}^{n}a_{1j}s_{j}\\\sum _{j=1}^{n}a_{2j}s_{j}\\\vdots \\\sum _{j=1}^{n}a_{mj}s_{j}\end{pmatrix}},$
which is given by an $m\times n$-matrix $M=(a_{ij})_{1\leq i\leq m,\,1\leq j\leq n}$, is linear.
# Matrix/Multiplication/Definition/Explanations/Remark

A matrix multiplication is only possible when the number of columns of the left-hand matrix equals the number of rows of the right-hand matrix. Just think of the scheme
    $(ROWROW){\begin{pmatrix}C\\O\\L\\U\\M\\N\end{pmatrix}}=(RC+O^{2}+WL+RU+OM+WN)\,,$
the result is an $1\times 1$-Matrix. In particular, one can multiply an $m\times n$-matrix $A$ with a column vector of length $n$ (the vector on the right), and the result is a column vector of length $m$. The two matrices can also be multiplied with roles interchanged,
    ${\begin{pmatrix}C\\O\\L\\U\\M\\N\end{pmatrix}}(ROWROW)={\begin{pmatrix}CR&CO&CW&CR&CO&CW\\OR&O^{2}&OW&OR&O^{2}&OW\\LR&LO&LW&LR&LO&LW\\UR&UO&UW&UR&UO&UW\\MR&MO&MW&MR&MO&MW\\NR&NO&NW&NR&NO&NW\end{pmatrix}}\,.$
# Matrix/Linear system/Solution set and preimage/Exercise

Let $M$ be an $m\times n$-matrix over the field $K$, let $\varphi \colon K^{n}\rightarrow K^{m}$ be the corresponding linear mapping, and let $Mx=c$ denote (depending on a vector $c\in K^{m}$) the corresponding system of linear equations. Show that the solution set of the system equals the preimage of $c$ under the linear mapping $\varphi$.
# Matrix/Powers/246/135/012/Up to 4/Exercise

Compute, for the matrix
    $M={\begin{pmatrix}2&4&6\\1&3&5\\0&1&2\end{pmatrix}}\,,$
the powers
    $M^{i},\,i=1,2,3,4.$
# Matrix/IxJ/nxm/Definition

Let $K$ denote a field, and let $I$ and $J$ denote index sets. An $I\times J$-matrix is a mapping
    $I\times J\longrightarrow K,(i,j)\longmapsto a_{ij}.$
If $I=\{1,\ldots ,m\}$ and $J=\{1,\ldots ,n\}$, then we talk about an $m\times n$-matrix. In this case, the matrix is usually written as
    ${\begin{pmatrix}a_{11}&a_{12}&\ldots &a_{1n}\\a_{21}&a_{22}&\ldots &a_{2n}\\\vdots &\vdots &\ddots &\vdots \\a_{m1}&a_{m2}&\ldots &a_{mn}\end{pmatrix}}.$
# Matrix/R/2x2/Characterize eigenspace configuration/Exercise

Consider the real matrices
    ${\begin{pmatrix}a&b\\c&d\end{pmatrix}}\in \operatorname {Mat} _{2}(\mathbb {R} )\,.$
Characterize, in dependence on $a,b,c,d$, when such a matrix has
* two different eigenvalues,
* one eigenvalue with a two-dimensional eigenspace,
* one eigenvalue with a one-dimensional eigenspace,
* no eigenvalue.
# Matrix/Rank/Columns and rows/Invertible/Introduction/Section
## Definition

Let $K$ be a field, and let $M$ denote an $m\times n$-matrix over $K$. Then the dimension of the linear subspace of $K^{m}$, generated by the columns, is called the column rank of the matrix, written
    $\operatorname {rk} \,M.$

## Lemma

Let $K$ denote a field, and let $V$ and $W$ denote $K$-vector spaces of dimensions $n$ and $m$. Let
    $\varphi \colon V\longrightarrow W$
be a linear mapping which is described by the matrix $M\in \operatorname {Mat} _{m\times n}(K)$, with respect to bases of the spaces. Then
    $\operatorname {rk} \,\varphi =\operatorname {rk} \,M\,$

### Proof

$\Box$
To formulate the next statement, we introduce row rank of an $m\times n$-matrix to be the dimension of the linear subspace of $K^{n}$ generated by the rows.

## Lemma

Let $K$ be a field, and let $M$ denote an $m\times n$-matrix over $K$. Then the column rank coincides with the row rank. If $M$ is transformed with elementary row manipulations to a matrix $M'$ in the sense of fact,
$M'$

### Proof

Let $r$ denote the number of the relevant rows in the matrix $M'$ in echelon form, gained by elementary row manipulations. We have to show that this number is the column rank, and the row rank of $M'$ and of $M$. In an elementary row manipulation, the linear subspace generated by the rows is not changed, therefore the row rank is not changed. So the row rank of $M$ equals the row rank of $M'$. This matrix has row rank $r$, since the first $r$ rows are linearly independent, and beside this, there are only zero rows. But $M'$ has also column rank $r$, since the $r$ columns, where there is a new step, are linearly independent, and the other columns are linear combinations of these $r$ columns. By exercise, the column rank is preserved by elementary row manipulations.
$\Box$
Both ranks coincide, so we only talk about the rank of a matrix.

## Corollary

Let $K$ be a field, and let $M$ denote an $n\times n$-matrix
$K$
* $M$ is invertible.
* The rank of $M$ is $n$.
* The rows of $M$ are linearly independent.
* The columns of $M$ are linearly independent.

### Proof

The equivalence of (2), (3) and (4) follows from the definition and from fact. For the equivalence of (1) and (2), let's consider the linear mapping
    $\varphi \colon K^{n}\longrightarrow K^{n}$
defined by $M$. The property that the column rank equals $n$, is equivalent with the map being surjective, and this is, due to fact, equivalent with the map being bijective. Because of fact, bijectivity is equivalent with the matrix being invertible.
$\Box$
# Nepal/Newspapers

There are not many daily newspapers in Nepal. The case is same in the weekly papers. There are many which are registered but not many of them are under continuous publication. Some of the newspapers which are popular in Nepal are 1)Kantipur 2)The Himalayan Times(english) 3)Nepal Samacharpatra 4)Kathmandu Post(english)
# Need

This psychology resource is a "stub". Learn how you can help Wikiversity to develop it.
Needs must be met to survive and thrive. Desires, likes, and wants, on the other hand, are pleasant to satisfy, but are not essential for survival and wellbeing.
There are physiological needs, psychological needs, and social needs.
# Nepal/Tallest Building

Nepal has already started constructing a massive 35 storey building. It is the official building of the NTC (Nepal telecom company )Nepal Telecom, the country's incumbent landline and GSM network operator has announced plans to build on of the tallest buildings in the South Asian Association for Regional Cooperation (SAARC) region. The building, to be constructed at the Jawalakhel NTC compound in Kathmandu will have upto 35 floors and a transmission network installed on the roof.
Once completed, "the building will be the pride of the nation," Sugat Ratna Kansakar, managing director of the NT, a state-run telecom company, told reporters last week. "We have been preparing the design of the building," he said, adding that efforts were on to receive permission from the Nepal Electricity Authority, Nepal Drinking Water Corporation and the Civil Aviation Authority of Nepal (CAAN).
The Nepal Telecom is yet to estimate the cost and time needed to construct the building, Kansakar said.
The tallest building in Nepal is currently 8 stories high. The region is subject to earthquakes so building that high will be a challenge."
# Real numbers/Intervals/Definition

For real numbers $a,b$, $a\leq b$, we call
* $[a,b]={\left\{x\in \mathbb {R} \mid x\geq a{\text{ and }}x\leq b\right\}}$ the closed interval.
* $]a,b[={\left\{x\in \mathbb {R} \mid x>a{\text{ and }}x<b\right\}}$ the open interval.
* $]a,b]={\left\{x\in \mathbb {R} \mid x>a{\text{ and }}x\leq b\right\}}$ the half-open interval (closed on the right).
* $[a,b[={\left\{x\in \mathbb {R} \mid x\geq a{\text{ and }}x<b\right\}}$ the half-open interval (closed on the left).
# Real numbers/Nested intervals/Definition

A sequence of closed intervals
    $I_{n}=[a_{n},b_{n}],\,n\in \mathbb {N} ,$
in $\mathbb {R}$ is called (a sequence of) nested intervals, if $I_{n+1}\subseteq I_{n}$ holds for all $n\in \mathbb {N}$, and if the sequence of the lengths of the intervals, i.e.
    ${\left(b_{n}-a_{n}\right)}_{n\in \mathbb {N} },$
converges to $0$.
# Real numbers/Heron/s method/Heron sequence/Definition

Let $c\in \mathbb {R} _{+}$ denote a positive real number. The Heron-sequence, with the positive initial value $x_{0}$, is defined recursively by
    $x_{n+1}:={\frac {x_{n}+{\frac {c}{x_{n}}}}{2}}\,$
# Real numbers/Modulus/Properties/Fact/Proof/Exercise

Prove the following properties for the
absolute value function
    $\mathbb {R} \longrightarrow \mathbb {R} ,x\longmapsto \vert {x}\vert ,$
(here let $x,y$ be arbitrary real numbers).
* $\vert {x}\vert \geq 0$.
* $\vert {x}\vert =0$ if and only if $x=0$.
* $\vert {x}\vert =\vert {y}\vert$ if and only if $x=y$ or $x=-y$.
* $\vert {y-x}\vert =\vert {x-y}\vert$.
* $\vert {xy}\vert =\vert {x}\vert \vert {y}\vert$.
* For $x\neq 0$ we have $\vert {x^{-1}}\vert =\vert {x}\vert ^{-1}$.
* We have $\vert {x+y}\vert \leq \vert {x}\vert +\vert {y}\vert$ (triangle inequality for modulus).
* $\vert {x+y}\vert \geq \vert {x}\vert -\vert {y}\vert$.
# Real numbers/Nested intervals/Point/Fact

Suppose that $I_{n}$, $n\in \mathbb {N}$, is a sequence of nested intervals in $\mathbb {R}$.
    $\bigcap _{n\in \mathbb {N} }I_{n}$
contains exactly one point
$x\in \mathbb {R}$
Nested intervals determine a unique real number.
# Real numbers/Ordering/Properties/Fact/Proof/Exercise

Prove the following properties of real numbers.
* $1\geq 0$.
* From $a\geq b$ and $c\geq 0$ follows $ac\geq bc$.
* From $a\geq b$ and $c\leq 0$ follows $ac\leq bc$.
* $a^{2}\geq 0$ holds.
* $a\geq b\geq 0$ implies $a^{n}\geq b^{n}$ for all $n\in \mathbb {N}$.
* From $a\geq 1$ follows $a^{n}\geq a^{m}$ for integers $n\geq m$.
* From $a>0$ follows ${\frac {1}{a}}>0$.
* From $a>b>0$ follows ${\frac {1}{a}}>{\frac {1}{b}}$.
# Real numbers/Modulus/Properties/Fact

The modulus function
    $\mathbb {R} \longrightarrow \mathbb {R} ,x\longmapsto \vert {x}\vert ,$
fulfills the following properties ($x,y$ are arbitrary real numbers).
* $\vert {x}\vert \geq 0$.
* $\vert {x}\vert =0$ if and only if $x=0$.
* $\vert {x}\vert =\vert {y}\vert$ if and only if $x=y$ or $x=-y$ holds.
* $\vert {y-x}\vert =\vert {x-y}\vert$.
* $\vert {xy}\vert =\vert {x}\vert \vert {y}\vert$.
* For $x\neq 0$ we have $\vert {x^{-1}}\vert =\vert {x}\vert ^{-1}$.
* We have $\vert {x+y}\vert \leq \vert {x}\vert +\vert {y}\vert$ (triangle inequality for the modulus).
* $\vert {x+y}\vert \geq \vert {x}\vert -\vert {y}\vert$.
# Real numbers/Nested intervals/Point/Fact/Proof/Exercise

Let $I_{n}$, $n\in \mathbb {N}$, be a sequence of nested intervals in $\mathbb {R}$. Prove that the intersection
    $\bigcap _{n\in \mathbb {N} }I_{n}$
consists of exactly one point $x\in \mathbb {R}$.
# Real numbers/Null sequences/Behavior of inverse sequences/Exercise

Give examples of convergent sequences of real numbers ${\left(x_{n}\right)}_{n\in \mathbb {N} }$ and ${\left(y_{n}\right)}_{n\in \mathbb {N} }$ with $x_{n}\neq 0$, $n\in \mathbb {N}$, and with $\lim _{n\rightarrow \infty }x_{n}=0$ such that the sequence
    ${\left({\frac {y_{n}}{x_{n}}}\right)}_{n\in \mathbb {N} }$
* converges to $0$,
* converges to $1$,
* diverges.
# Real numbers/Modulus/Definition

For a real number $x\in \mathbb {R}$, the modulus is defined in the following way.
    $\vert {x}\vert ={\begin{cases}x\,,{\text{ if }}x\geq 0\,,\\-x,\,{\text{ if }}x<0\,.\end{cases}}\,$
# Matrix powers/ab0d/Formula/Exercise

Let $n\in \mathbb {N}$. Find and prove a formula for the $n$-th power of the matrix
    ${\begin{pmatrix}a&b\\0&c\end{pmatrix}}.$
# Maxima programming in plain view
## Maxima in ODE

* Introduction to Differential Equation
* First-Order Differential Equation
* Second-Order Differential Equation
* Higher-Order Differential Equation

## Maxima in Control Systems

* Time Domain Analysis
go to [ Electrical_&_Computer_Engineering_Studies ]
# May anyone call themselves a philosopher?

Philosophy is the love of or the desire for wisdom. Everyone can philosophize. You ask yourself big questions and then think about those questions. But if everyone can philosophize, does that mean everyone may call themselves a philosopher, regardless of their experience or education? Or are there certain requirements for this?

## Anyone may call themselves a philosopher
### Pro

* Pro The term 'philosopher' is not protected, unlike 'doctor' or 'historian'. This means that anyone can call themselves a philosopher.
* Pro Everyone is a philosopher, since everyone does ask questions about life.
** Objection Asking questions about life does not make one a philosopher and it's a false ungrounded assumption that everyone does so or further things.

### Con

* Con You should have completed an accredited education in philosophy.
** Objection What if people struggle with studying in school but are still good at philosophizing? Then they would never get the chance to call themselves a philosopher.
* Con You should be able to prove that you are engaged in philosophy if you want to call yourself a philosopher, otherwise even a non-philosopher with dishonest intentions can call himself a philosopher.
# Matrix multiplication/e i e j/Exercise

Determine the product of matrices
    $e_{i}\circ e_{j},$
where the $i$-th standard vector (of length $n$) is considered as a row vector, and the $j$-th standard vector (also of length $n$) is considered as a column vector.
# Matrix multiplication examples
## Permutations
### Nimber multiplication table

Walsh permutation; nimber multiplication; patterns

## Walsh spectrum of Boolean functions

The Walsh spectrum of a Boolean function is the product of it's binary string representation and a Walsh matrix.
| The Walsh spectrum of the Boolean function $(1,0,1,0,0,1,1,0)$ is $(4,2,0,-2,0,2,0,2)$ Compare Figure 1 in Walsh Spectrum Computations Using Cayley Graphs by W. J. Townsend and M. A. Thornton | Walsh spectra of 8 Boolean functions in the same small equivalence class (including the function in the file on the left) |
The background pattern of white and red squares in the resulting matrix shows the binary Walsh spectra. In the following cases, they form binary Walsh matrices:
sec matrix     *     binary Walsh matrix       =        binary Walsh matrix :

## LDU decomposition of a Walsh matrix

Positive numbers are green, the zero white, negatives red. The ones in the lower and upper triangular matrices form Sierpinski triangles. The entries of the diagonal matrix are from Gould's-Morse sequence.

## Product of a Walsh matrix and Gould's-Morse sequence

Concider a Walsh matrix of order 2$^n$ and a column vector with the first 2$^n$ values from Gould's sequence with the signs distributed like the ones in Thue–Morse sequence sequence.
Their product always has the first 2$^n$ values from  A048883 (like Gould's sequence, but with powers of 3 instead of 2) and the signs are distributed like:
* the zeros in Thue-Morse sequence for odd n
* the ones in Thue-Morse sequence for even n
| n = 8 | n = 16 |

## "n-ary Walsh matrices"

The product of matrices made of consecutive numbers in the n-based numeral system gives an "n-ary Walsh matrix" , when modulo n operations are used. In the following files the result for normal operations is shown in light gray numbers.
In each row and column, except the one with only zeros, there is an equal number of entries for the same value.
| Binary Walsh matrix white 0, red 1 | "Ternary Walsh matrix" white 0, green 1, red 2 | "Balanced ternary Walsh matrix" red −1, white 0, green 1 |

## Quaternion group

The quaternion group can be defined via matrix multiplication in different ways:
| Q. g. as a subgroup of SL(2,C) | Q. g. as a subgroup of SL(2,3) |
# Protoscience

Welcome to the Wikiversity learning project for Protoscience.

## Project Goals

Protoscience is often science in search of new methods for the study of aspects of the universe that have so far avoided scientific analysis. For example, a science of astrophysics was greatly facilitated by the development of stellar spectroscopy methods. Before such experimental methods, the composition of stars was often used as an example of something beyond human knowing.
The development of some protosciences can be delayed because our existing conceptual systems make us cognitively closed to some new ideas. For example, before ocean rifts and trenches were understood, it was difficult for geologists to accept plate tectonics as meaningful science.
This project allows Wikiversity participants to explore how pre-scientific ideas can be explored by the scientific method and become new sciences. Which new areas of science are just waiting for methodological or conceptual breakthroughs? Are there some aspects of the universe that are simply beyond our technical or conceptual limitations?

## Case studies
### Exobiology

Reading: Read some of the news articles at Astrobiology Magazine.

#### Discussion

One common step in the development of new sciences is the establishment of one or more scientific journals where articles can be published about the new scientific discipline. What scientific journals exist for Exobiology (Astrobiology)?
One common step in the development of new sciences is the establishment of new departments, interdisciplinary programs or courses within science faculties of universities. Which universities have courses about Exobiology (Astrobiology)? Which departments host these courses?
# Pseudoscience/Alternative medicine

Alternative medicine are generally practices that lack biological plausibility and are untested or untestable. In a few cases they are proven ineffective.
While the aim is to achieve the healing effects of medicine, alternative therapies share in common that they reside outside medical science.
Common alternative medicine includes :
* Traditional Chinese Medicine
* Mind–body interventions or Mind–body medicine
* Naturopathy, naturopathic medicine or natural medicine
* Homeopathy
* Faith healing

## Discussion

* Should Alternative medicine consider as a pseudoscience or pseudo-scientific medicine ?
* Should alternative medicine practice teach in university ?
* Should the government ban alternative medicine practice ?
# Pseudocode

Pseudocode is an informal high-level description of the operating principle of a computer program or other algorithm. It uses the structural conventions of a normal programming language, but is intended for human reading rather than machine reading. Pseudocode typically omits details that are essential for machine understanding of the algorithm, such as variable declarations, system-specific code and some subroutines. The purpose of using pseudocode is that it is easier for people to understand than conventional programming language code, and that it is an efficient and environment-independent description of the key principles of an algorithm. No standard for pseudocode syntax exists, as a program in pseudocode is not an executable program.

## Readings

* Wikipedia: Pseudocode

## Multimedia

* YouTube: What is Pseudocode?
* YouTube: Pseudocode Tutorial
* SlideShare: Introduction to Pseudocode

## See Also

* Gaddis Pseudocode
* Category: Pseudocode
* Cal Poly: Pseudocode Standard
* University of North Florida: Pseudocode Examples
* Guy Hass: Pseudocode Introduction
# Pseudoscience/Creation science

Are attempts to create a science of creationism a pseudoscientific expression of religious fundamentalism?

## The Wedge strategy

Read and discuss the Wedge strategy.
* ↑ A community experiment with fully open and published peer review by Eugene V. Koonin, Laura F. Landweber and David J. Lipman in Biology Direct (2006) Volume 1, page 1.
* ↑ Science and fundamentalism by Massimo Pigliucci in EMBO Reports (2005) Volume 6, pages 1106–1109.
# Pseudocode/Gaddis Pseudocode

Gaddis Pseudocode refers to the pseudocode language described in the book, "Starting Out with Programming Logic and Design", by Tony Gaddis. The language includes elements for variables, named constants, comments, input / output, operators, conditional statements, loops, subroutines, file processing, and classes.

## Variables

Data Types:
* Integer
* Real
* String
* Character
Syntax:
* Declare DataType VariableName
* Declare DataType ArrayName[Size]

## Constants

Syntax:
* Constant DataType Name = Value

## Comments

Syntax:
* // Comment

## Input / Output

Syntax:
* Input VariableName
* Display item, ...
** item must be a variable or literal

## Math Operators

* + (Add)
* - (Subtract)
* * (Multiply)
* / (Divide)
* MOD (Modulus)
* ^ (Exponent)

## Relational Operators

* > (Greater than)
* < (Less than)
* >= (Greater than or equal to)
* <= (Less than or equal to)
* == (Equal to)
* != (Not equal to)

## Logical Operators

* AND (And)
* OR (Or)
* NOT (Not)