Formatting of a Windows Computer

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 disk is formatted. Depending on the size, this process can take minutes to hours.

 

After this semester, i will kill my surface, that he can born new with fresh energy.

11600175054_c4437b5bcc_z.jpg

 

Hope that helped you a little bit my friends.

What is programming in general?!

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 she wrote already 100 years before the first computer was built. Mathematician Grace Hopper created the first compiler in 1949, which translates the source code into machine code.

Mastery Topics – #TC1017 (Python3)

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 and booleans.

The use for integer and float is only for numbers. While the integer is for numbers without decimals is the float type for numbers with decimals.

String is for letters, numbers and whole sentences. While the char is only for one letter in the UTF table.

Boolean have just two conditions – true and false. The most use for a bool is in a loop.

 

Mastery Topic #4 – Basic output (print)

An output is, what the program shows the user.

Here an example: m4.PNGm4-2.PNG

 

Mastery Topic #5 – Basic user input (input)

The input is, what the user gives the program.

Here an example:

m5.PNG

In this case, the user have to give a number to the program. The reason why we change the number in the second line is because python safe all inputs as a String. So we need to convert always the input when we need something else than a String.

 

Mastery Topic #6 & #7 – Calling functions & Creating functions

m6.PNG

What we do here first, is that we define/create our function. In the second step we call it. The function could do something with the inport of the string and the number. But therefore we would need to code unter the definition what the function should do.

 

Mastery Topic #8 – Importing and using library

Importing and using of the library is necessary e.g. for mathematical operations.

m8.PNG

with the keyword import and math we import the whole math library.

One of the function of the math library is the sqrt. So we call this function of the math library with the code math.sqrt()

m8-2.PNG

 

Mastery Topic #9 – Creating and using you own libraries (using multiple files)

What i learned in 2 WSQ´s was, that we first should create a text file e.g. data.txt. The task was, that we should work with this text file in a program.

Here a example how we did this.

m8.PNG

The most important part is the one in the red „circle“ (:D). We tell the program where the file is. The path. and After that, we give this file to the function file_count. Now the program is able to work with the text file.

 

Mastery Topic #10 – Use the conditional if

m10.PNG

The if condition do something if a condition is fulfilled. In this case, the if just works, when the user gives a number higher that 50 as a input. If this not happens, the program would´t do anything with this if condition. The program would pass the if part and run normally after the passing.

 

Mastery Topic #11 – Using of else with a if condition

m11.PNG

In a if-else case, the program also just take the if when the condition is fulfilled. If that not happens the program ALWAYS will take the else.

 

Mastery Topic #12 – Nesting of conditional statements (if´s inside if´s)

m12.PNG

 

After #10 & #11, it is very simple to understand what the program is going to do here.

 

 

 

 

Mastery Topic #13 – Use of loops with „while“ and „do while“

m13.PNG

 

A while loop starts with the keyword while. The specialty of this loop is, that he just do this loop as long as a is smaller than 10. When a would have 10 or bigger before the loop The loop would not run.

 

 

In the do while case we have the specialty, that the loop is going to run minimum one time. Just at the end of the loop, the condition is going to be checked. If the condition is true, the program jumps again to the beginning of the loop.

 

Mastery Topic #14 – Use of loops with „for“

m14.PNG

The specialty of a for loop is that the programmer gives the conditions when he write the loop. In this case the programmer just say, work with i! Set i to 10 and print it until it is at the number 20!

 

Mastery Topic #15 – Nested loops

After you understand, how loops are working. there is no problem to unterstand how nested loops are working. Every loop has the same characteristics like before.

 

 

Hope this will help in the future. Enjoy and have fun!

Greetings from a German exchange student

 

 

 

 

 

Estimating e – (WSQ12)

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)

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)

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)

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)

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)

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.