Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
So we already have seen and talked about how to work with functions and files.
OK, we've seen how we can write data from our program and to a given file and also how we can read
data from a file to our program that is basically now being run.
OK, so we remember we talked about these two parts.
There was the program.
There is the file and how we want different functions.
They can communicate and share data between them to the program from the program to the file and from
the file.
OK, and in this example, what I want us to do is basically to write a program that will save oenophile.
OK, let's say that this is our file.
It will save ten natural numbers from one to 10 and Avea powers alongside them.
So I mean, if we have the number itself, let's say one and its value is going to be in the power of
two.
So it will be one.
If we have two, it will be four.
If we have three, it will be nine.
If we have four, it will be 16 and so on and so forth.
OK, up until let's say 10.
So.
Once you approach this solution, try to think what is the most preferred and most?
And the best function that you will consider using one of the six that we already learned, OK, whether
it is going to be F Putsy if Getsy F print, f f f f getas or F protests.
So one of them is going to be very handy.
It's going to be very handy in this solving of this exercise.
So try to come up with a good idea, try to write this program on your own and once you finish.
Please just go to the folder that you created, the file in this case, I don't know, I have this file
and open, open it up, open this fall.
It opened this file and see for yourself that you have the results exactly as you expected, and only
then move to the solutions video to make sure that everything works exactly as you expected.
That's it.
OK, and if you still can't figure out why, give it a try.
Give it to try and give it a third try and then only move to the previous videos, watch them again,
try to understand where things went wrong and then come back and solve it again.
If it's still unsolvable, then move to the solution.
That's the process of learning.
Good luck.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.