• Keine Ergebnisse gefunden

Some simple questions

N/A
N/A
Protected

Academic year: 2021

Aktie "Some simple questions"

Copied!
18
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Outline

1 Some simple questions 2 A little Mathematics 3 Programming Basics 4 A small byte of Python 5 Logistical Affairs

6 Does Size Matter?

(2)

Some simple questions

Maths for Computer Science

Write down the binary representation of 76 (Decimal) Find the value of 2

16

in 4 multiplications

If log

a10

= b , How many digits are there in the decimal representation of a ?

If x = 100101011011 is a binary number, write down the representation of 2 · x

How do you convert from Binary to Octal

representation?

(3)

Some simple questions

Algorithms - How to DO things?

Square 53 in your head

Can you teach someone how to sort a deck of cards?

Just think about that.

Have you heard about Tower of Hanoi? If yes, do you know how to solve TOH of any size?

You are the postman/woman of your locality. How

would you deliver the posts with least effort / maximum

efficiency?

(4)

Some simple questions

Bonus Questions

Have you heard about Fibonacci series? Do you know the connection of rabbits and computer science?

What is the difference between a N

IBBLE

and a W

ORD

Do you already know how to print ”Hello World” with some programming language?

Write a program that prints the numbers from 1 to 100. But

for multiples of three print ”Fizz” instead of the number and

for the multiples of five print ”Buzz”. For numbers which are

multiples of both three and five print ”FizzBuzz”.

(5)

Some simple questions

Attraction

How do the following work?

A search engine.

A code-beautifier.

RSS feed system.

Spell checker.

(6)

A little Mathematics

Maths for Computer Science

Write down the binary representation of 76 (Decimal) 76 = 64 + 8 + 4 = 1001100

Find the value of 2

16

in 4 multiplications ((( 2

2)2)2)

2

If log

a10

= b , How many digits are there in the decimal representation of a ?

log 100 = 2 and there are three digits.

(7)

A little Mathematics

The representation issues

If x = 100101011011 is a binary number, write down the representation of 2 · x

Any decimal number multiplied with 10 just adds a zero to the end. So any binary number multiplied with 2 should...

How do you convert from Binary to Octal representation?

Take 3 at a time.

(8)

Programming Basics

The way of doing things

Square 53 in your head.

53

2

= (50 + 3)

2

= 50

2

+ 3

2

+ 2 · 50 · 3

Can you teach someone how to sort a deck of cards?

Just think about that.

....

Have you heard about Tower of Hanoi? If yes, do you know how to solve TOH of any size?

Solve the TOH of one lower to the temporary pole;

move the bottom disc; now solve the TOH of one lower

form temporary to the final one.

(9)

Programming Basics

The way of doing things!

You are the postman/woman of your locality. How would you deliver the posts with least effort / maximum efficiency?

Minimum Spanning Tree.

Have you heard about Fibonacci series? Do you know the connection of rabbits and computer science?

1, 1, 2, 3, 5, 8, 13, 21, 34,

A pair of rabbits in the beginning of a month.

What is the difference between a N

IBBLE

and a W

ORD

4 bits and 4 bytes

(10)

A small byte of Python

Why Python?

Excellent for beginners, yet superb for experts Rapid development

portable, cross-platform Object-oriented

You can get the job done Simple stable and mature Wealth of 3rd party packages

http://pythoncard.sf.net/what is python.html

(11)

A small byte of Python

Who uses it anyway?

Google, Yahoo! - for internet services.

IBM, Seagate, Hewlett Packard - for hardware testing.

http://www.python.org/about/success/

(12)

A small byte of Python

Getting Ready for the Byte

Download

http://www.python.org/download/releases/2.6.2/

Should we use Python 3.0?

Install In Windows it is easy. In Linux, one has to do ./configure; make ; make install to have it installed.

Run In Windows: Demo

In Linux, one can run it from terminal/console.

(13)

A small byte of Python

Using IDLE

Python comes with an own editor/programming environment.

IDLE

(14)

A small byte of Python

Hello World

print "Hello World"

print ’Hello World’

(15)

A small byte of Python

Compiler and Interpreter

A compiler takes all of the code and translates it into something a computer can understand. This compiled code is then

executed or saved to a file to be executed at a later time.

While an interpreter takes code and translates it line by line. An doesn’t save the translated code in a file.

Python is interpreted.

Byte Code

(16)

Logistical Affairs

What do you need?

Do you need credits? or Pass/Fail or Attendance?

Is there anything else I could do?

(17)

Logistical Affairs

Course Details

We’ll KISS

1

Homework - What is you opinion?

Constant Feedback

(18)

Does Size Matter?

Does Size Matter?

What do you think? Does it matter?

Referenzen

ÄHNLICHE DOKUMENTE

The APS Collaboration Grant funds public programs and projects that foster collaboration between members of the print community and/or encourage dialogue between the

The Association of Print Scholars invites submissions for the 2020 APS Publication Grant, sup- ported by C.G.. Boerner and

The Association of Print Scholars invites submissions for the 2020 APS Collaboration Grant. This grant funds public programs and projects that foster collaboration between members

A qualitative, systematic review of the literatu- re on possible influences on the findings, protocols, and quality of drug trials [Finanzierung von Arzneimittelstudien

caracteristiques physiques des programmes residentiels clos La diffusion de la fermeture residentielle, teile qu'elle apparait dans le descriptif des programmes immobi¬ liers en

Since the problems of Taylor stability and Benard stability are very similar, Venezian [5] investigated the thermal analogue of Donnelly’s experiment [6], using free-free surfaces,

Against this theoretical background, the aims of this study are: (1) to pre- sent a more detailed view of current practices employed in the British mono- lingual learner's

Die Autoren untersuchten bei zehn Patienten mit funktioneller Dyspepsie Magen- und Dünndarm- motilität, Transitzeit, Reaktion des Jejunums auf Ballondistension und Neostigmin