pink winter dream
please the entire code below and into the gadget HTML / JavaScript insert
This is the introductory text, easy to read in a string called "introduction"At the end of file, of course, need be no more blank lines. The program should read those files and set the following variable:
. With all the characters and line breaks. This introduction
ends with two blank lines.
This is the first question. The text of this question may also extend over several lines
. Still this is a text without the line breaks are taken
(replace line braks by spaces). Further information
are indented by at least two spaces immediately after
this text. Optional may be a blank line.
Optional text to be adopted as the introduction with all the breaks so
as he is in the file, but without the indentation. All
further information comes back engaged, with an optional
removed blank line. The points for this question are in parentheses
set (at the beginning of the line with indentation). Are there any marks, so use
first
option can be specified in {} is a number> 0 and \u0026lt;= 1, which
is interpreted as a "factor". Again, only with appropriate indentation.
(specify the factor should the proportion of correct and incorrect answers
should then be used in the generation of tests, 0.5
means half).
(2) {0.75}
[X] This is a correct answer.
[] This is a wrong answer. can
[X] This is a right answer, which extend over several lines
. can
[] This is a wrong answer, which extend over several lines
.
The indentation is again essential. The
line breaks and indentation should be removed
.
This is the next question, it comes with two blank lines from the
last separated. There must be no further information be given
. In this case, it would be a 1-point question with no selection
options, thus a direct question to answer.
the third question. Now, if a 1-point question and without factor
without text.
[] false solution.
[X] right solution.
[] false solution.
initial introduction to the text. ask , a list of questions. Each question is a dictionary with following keys and values: "ask" with the text of the question. "text" with the optional text (or not). "points" with the read points or 1 "factor" factor with the read (or not). "right" with a list of correct answers (without "[X]" ). false with a list of correct answers (without "[]" ). can manage title; Artist . title; Artist; Voting . $ python charts.py
0 End
1 songs enter
Voting record
2 3 4 Songs
hit list from a file
5 Songs to file
6 hit list from a file
7 Hitlist Save to File
>>> 1
title>>> Peter Gunn
Artist>>> Emerson, Lake & Palmer
0 End
1 songs enter
2 3
Voting record charts
4 Songs from Read file
5 Songs to file
6 7
hit list from file to file charts
>>> 1
title>>> Haitian Fight Song
Artist>>> Charles Mingus
0 End 1 Songs
enter
2 3 Voting record
Hitlist
4 Songs from file to file
5 Songs
6 7
hit list from a file to file charts
>>> 5
filename [songs.txt] >>>
0 End
1 songs enter
Voting record
2 3 4 Songs charts
read from file
5 Songs to file
6 hit list from a file
7
hit list to a file>>> 4
filename [songs.txt]>>>
enter 0 End
1 Songs 2
Voting record
3 Hit List
Rating 4 songs from file to file
5 Songs
six charts from file to file
7 Hitlist
>>> 3
Peter Gunn , Emerson, Lake & Palmer 0
Haitian Fight Song Charles Mingus 0
Gamma Ray Birth Control 0
Spectrum Billy Cobham 0
Take Five Dave Brubek 0
Overnite Sensation Frank Zappa 0
Sing, Sing, Sing Gene Krupa , 0
Bahamut Hazmat Modine 0
Cantaloupe Island Herbie Hankock 0
Blue Train John Coltraine 0
North Carolina Les McCann 0
Pressure Mary Broadcast Band 0
Mile Stones Miles Davis
0 0 End
1 songs enter
2 3 Voting record
Hitlist
4 Songs from file to file
5 Songs
6
hit list from a file save to file charts
7> >> 2
title (or part)>>> Peter
vote for Peter Gunn>>> 23
0 End
1 songs enter
Voting record
2 3 4 Songs charts
read from file
5 Songs to file
6 hit list from a file
7
hit list to a file>>> 3
Peter Gunn Emerson, Lake & Palmer 23
Haitian Fight Song Charles Mingus 0
Gamma Ray Birth Control 0
Spectrum Billy Cobham 0
Take Five Dave Brubek 0
Overnite Sensation Frank Zappa 0
Sing, Sing, Sing Gene Krupa 0
Bahamut Hazmat Modine 0
Cantaloupe Island Herbie Hankock 0
Blue Train John Coltraine 0
North Carolina Les McCann 0
Pressure Mary Broadcast Band 0
Mile Stones Miles Davis
0 0 End
1 Songs Enter
2 3 Voting record
Hitlist
4 Songs from file to file
5 Songs
6 hit list from a file
7
hit list to a file>>> 2
title (or part)>> > Gamm
vote for Gamma Ray>>> 25
1 Songs 0 End
enter
2 3
Voting record charts
4 Songs from file to file
5 Songs
6 hit list from a file
7
hit list to a file>>> 3
Gamma Ray Birth Control 25
Peter Gunn Emerson, Lake & Palmer 23
Haitian Fight Song Charles Mingus 0
Spectrum Billy Cobham 0
Take Five Dave Brubek 0
Overnite Sensation Frank Zappa 0
Sing, Sing, Sing Gene Krupa 0
Bahamut Hazmat Modine 0
Cantaloupe Island Herbie Hankock 0
Blue Train John Coltrain
0 The North Carolina McCann 0
Pressure Mary Broadcast Band 0
Mile Stones , Miles Davis
0 0 End
1 songs enter
2 3 Voting record
Hitlist
4 Songs from file
read 5 Songs to file
6 Hitlist read from file to file
7 Hitlist
>>> 7
filename [charts.txt]>>>
0 End
1 songs enter
Voting record
2 3 4 Songs charts
read from file
5 Songs to file
6 hit list from a file
7
hit list to a file>>> 0
$
2 x - name -python-charts , where x "a" for 2AHIF and "c" and 2CHIF name your family name will be (with the same names you please 2 x - name-first name -python-charts thereof). The program itself is called charts.py .
. 15 20 15 6 1 1 7
21 35 35 21 7 1 1 8 28 56
70 56 28 8 1
1 9 36 84 126 126 84 36 9 1
The program is formatted the triangle beautiful characters to the console.
Levyyour surname shall be (in the same names you please 2 x
Name the project
2
x
-
name
-python-pascal
, with
x
"a" for 2AHIF and "c" for 2CHIF and
name
thereof). The program itself is called pascal.py . generating you with your program, the triangles with n = 1 to n = 10 in files named dreieck01.txt to dreieck10.txt . Take these files to the project. Check in the project and the CVS "commit" your final version. and spend. ZB (a + b) 2 = a 2 + 2ab + b 2 or (a + b) = a