Formatting of a Windows Computer

--Originally published at TC1017 (Python3) – Titel der Website

Thats a blog post for two courses of Ken. TC1017 & TC 2027.

The reason why i took this topic is first of all, that Ken talked a lot in this semester about reason why we should Format a computer. Reasons are, that a student clicks a lot of times not serious links or just download a lot of trash to the computer. The result is most of the time a super slow computer. A computer which worked 1000 times slower than the first day of using.

2921313890_d14ddeb35f_z.jpg

An other reason is a personal reason. I guess i am one of the students, which did a lot of mistakes with clicking links and download trash. So why i post this is, i just Format one time in my life a computer by my own. I just want to do that again. To learn how it works and to rescue my lovely Surface 4 ?

 

To the operative work:

It is super easy to format a Windows computer nowadays.

The first step is to safe all your Datas, which you not want to lose. But important is, to realize that maybe movies, music or other stuff from strange websites could be the reason why a computer is not running like it should. So think twice if you also want to safe all the trash!

The reason for the first step is, that the computer will be empty after the process for Formatting.

Now the steps

  1. Simultaneously press the [Windows] and [R] keys to open the Run command.
  2. Enter „diskmgmt.msc“ here and confirm with „OK“. Subsequently, the disk management opens.
  3. Select the desired hard disk from the list and click on it with the right mouse button.
  4. Select the option „Format“ and confirm the process via the „OK“ button.
  5. Then the hard
    11600175054_c4437b5bcc_z.jpg
    Continue reading "Formatting of a Windows Computer"

What is programming in general?!

--Originally published at TC1017 (Python3) – Titel der Website

Dear amigos,

this is a extra blog post, in which i am going to write about programming in general.

 

Programming denotes the activity of creating computer programs. This is a subsection of software development and includes above all the implementation of the software design in source code and – depending on the programming language – the translation of the source code into the machine language, usually using a compiler.
Programs are formulated („encoded“) using programming languages. In such a language, the programmer „translates“ the requirements and algorithms. Increasingly, it is supported by code generators that automatically generate at least parts of the program code based on models. Other tasks of programmers include, for example, testing of its program, creating software documentation.
In many, especially in smaller software projects and using Agile processes, the design and the creation of a program run in parallel, the program develops in these cases in close interaction with the design and vice versa. In larger projects, the design and the programming (then often called implementation)are processed sequentially. The programmer converts the specifications of the design into program code. Nonetheless, programming is also a creative activity. While the design provides a functional framework, it can be implemented in a variety of ways.
Similar meanings: Colloquially one designates the occasional also the configuration of household or other electrical devices as „programming“. Even organizational units of companies in which software is developed are or were sometimes called „programming“.

3293759838_12a7907fb1_m.jpg

About the history:

Charles Babbage designed the Analytical Engine, which was never built. Ada Lovelace translated in 1843 the description from French and added own notes. These were twice as long as the original French text by Luigi Menabrea. The notes contained a tabular plan for calculating Bernoulli numbers, which is referred to as the first program. These notes

Continue reading "What is programming in general?!"

Mastery Topics – #TC1017 (Python3)

--Originally published at TC1017 (Python3) – Titel der Website

Dear friends,

30 minutes ago, I had an appointment with Ken. Yes, we all know, that we normally program with C++ in this course. But Ken gave me at the beginning of the semester the great opportunity to program with python3 in this semester.

So a lot of things/codes are in python much easier and shorter than in C++. That was the reason for my appointment with Ken. Because of this reason i agreed with Ken that I am going to do a huge blog post with 15 mastery topics.

Enjoy…

Mastery Topic #1 – Use of comments

M1.PNG

For a comment you just use the Hash symbol (#). What makes the comment to a comment, ist that every symbol after the # is grey.

 

Mastery Topic #2 – Python conventions (Zen of Python)

The Zen of Python

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren’t special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one– and preferably only one –obvious way to do it.
Although that way may not be obvious at first unless you’re Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it’s a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea — let’s do more of those!

https://www.python.org/dev/peps/pep-0020/

 

Mastery Topic #3 – Basic types and their use

Basic (or also primitiv) types in python are: Integer, floats, strings, characters

m4.PNG
m4-2.PNG
m5.PNG
m6.PNG
m8.PNG
m8-2.PNG
m8.PNG
m10.PNG
m11.PNG
m12.PNG
m13.PNG
m14.PNG
Continue reading "Mastery Topics – #TC1017 (Python3)"

Estimating e – (WSQ12)

--Originally published at TC1017 (Python3) – Titel der Website

What To Do

In this assignment you will estimate the mathematical constant e. You should create a function called calculuate_e which receives one parameter called precision that should specify the number of decimal points of accuracy.

You will want to use the infinite series to calculate the value, stopping when the accuracy is reached (previous and current calculation are the same at the specified accuracy).

 

My Sourcecode:

WSQ12 - SourceCode.PNG

The result:

WSQ12 - Ergebnis.PNG


Go Bananas – (WSQ11)

--Originally published at TC1017 (Python3) – Titel der Website

What was to do in this WSQ:

Write a function called find_bananas which receives a single parameter called filename (a string) and returns a positive integer which is the number of times the word (string) “banana”  (or “BANANA” ) is found in the file. The banana can be any case (‘BaNana’ or ‘BANANA’ or ‘banana’, etc) and they can be “stuck together” like “banAnaBANANA” (that counts as two). Create your own test file (plain text) to check your work.

My Banana File:

WSQ11 - TextDatei.PNG

My Sourcecode:

WSQ11 - SourceCode.PNG

The result:

WSQ11 - Ergebnis.PNG


Multipart Data and Files – (WSQ09)

--Originally published at TC1017 (Python3) – Titel der Website

The assignment:

So for this assignment I would like to see you create a function that receives as parameter the name of a file (this would be a string value like data.txt) and your function counts the number of lines and the number of characters in the file which it returns as a single value (but with two values). You will want to look at how to create/define and return a struct value from a function and how to open and read text files line by line

 

My text data:

WSQ09 - txt.data.PNG

My Sourcecode:

WSQ09 - SourceCode.PNG

The result:

WSQ09 - Ergebnis.PNG


WSQ07 – Lists (total, average and standard deviation)

--Originally published at TC1017 (Python3) – Titel der Website

Hello Guys,

after a long time its me again! Sercan aka. Sergio

 

I had a big problem with the standard deviation while i was doing this WSQ. Actually i didn´t even found something in the internet how to program this that. Well, to solve the problem i needed help from the Superheroprogrammerwithstil Ken. So I made an appointment with him to talk about this issue.

The result of the source code is, that i implement with Ken a lot of new Python code, which i didn’t knew before.

SourceCode - WSQ07.PNG

Python has his own Math library. That means, if you don´t call the library or a specific function of the library, python is not able to do things which you want to do. In line 1 e.g. i call the specific math function sqrt. But to make sure that all math functions are reachable, i just call them with import math.

To make sure that don´t program unnecessary code for the input of 10 numbers I just programmed a for loop until the User gives the program 10 Numbers.

To unterstand the lines from 16 – 25 we need to know how the standard deviation works.

standardabweichung-berechnen-beispiel-1-2.jpgTherefore the formula.

 

So we need the total for the average and the average for the fraction of the st. dev.

After we have that all, we just use the math function to make sure that we extract the root.

 

The result is:

WSQ07 - Ergebnis - Lists.PNG

 

Enjoy Fellas.


Factorial Calculator (WSQ06)

--Originally published at TC1017 (Python3) – Titel der Website

Hello Guys,

 

the WSQ06 was for me, until now, the hardest program to write. The most time I lost with thinking about the program-structure. Like Ken once told us: „Sometimes it is better to delete all your coding and start from the beginning“.

Although it was an overcoming for me I had to do 2 times a Reengineering.

The second thing was the way to count the Factorial. Since now I did the Factorial always with the Calculator and never thought about how the calculator would be programmed to get the result of the Factorial.

Nevertheless, I found a good way to program the Factorial.

My Source-Code:

WSQ06 - SourceCode - Fak.PNG

My result:

WSQ06 - Ergebnis - Fak.PNG

 

If you have a question, just ask me.

I am going to try to help you Guys.

 

Enjoy.

 


Fun with Numbers and Functions (WSQ05)

--Originally published at TC1017 (Python3) – Titel der Website

Hello Guys,

this is the continuation of the WSQ01 (Fun with numbers).

The task here was, to calculate the numbers of User with functions.

To understand how Functions work on Python3 i found the following video.

 

Which i have not found is how to work with a return value.

 

The Program:

WSQ5 - SourceCode - FunWithNum2.PNG

 

The Result:

WSQ5 - Ergebnis - FunWithNum2.PNG

 

 

Enjoy.