Twise Random

A site about computer science .
Skip to content
  • apple
  • android
  • c
  • cpp
  • data structure and algorithms
  • macos
  • python
  • tutorials

Solving english ruler problem using recursion in python and swift

Posted on August 12, 2019September 26, 2020 by mohamad wael

We must print an english ruler using recursion . An english ruler is ruler where each unit has a number of tick. a unit can be divided into smaller units at 1/2 the interval 1/4 the interval 1/8 the interval … Read More

data structure and algorithms english ruler, php, python, recursion, swift

What is the addView method in android ?

Posted on August 8, 2019August 27, 2021 by mohamad wael

The addView method, is used to add a View programmatically to a ViewGroup. A ViewGroup can be for example, a LinearLayout, or a RelativeLayout.. A ViewGroup is itself a View. The addView method is overloaded.

The… Read More

viewgroup

what is a character in python ?

Posted on August 5, 2019November 30, 2020 by mohamad wael

What is a character in python ?

A character in python is represented using a Unicode code point. A Unicode code point is written by using U+ followed by a number written in hexadecimal . This number written in hexadecimal … Read More

python ascii, code points, encoding, hex, octal, ord, unicode

what is a byte ?

Posted on August 3, 2019September 26, 2020 by mohamad wael

what is a byte ?

A byte is 8 bits ,

 [_ _ _ _ _ _ _ _ ]
  7 6 5 4 3 2 1 0 
number of bits = 7 - 0 + 1 = 8

A … Read More

data structure and algorithms byte, decimal, hexadecimal, octal

reversed in python , a tutorial

Posted on July 30, 2019October 29, 2020 by mohamad wael

What is reversed?

The reversed class is used to create a reverse iterator from an object .

This object , must either implement the __getitem__ and the __len__ special methods . In this case reverse will create an iterator from

… Read More
python __reversed__, generator, iterable, reversed

Generators in python , a tutorial

Posted on July 28, 2019September 26, 2020 by mohamad wael

What is a generator

A generator simply generates data that we are going to use someplace. For example ,if we want to generate some random characters , or if we want to generate a number in a mathematical series , … Read More

python

what is an object in python ?

Posted on July 24, 2019October 29, 2020 by mohamad wael

In python , we have the class type , and we have the class object .

The class type is used to create a new type/class .

The class type is also used to get the type/class used to create … Read More

python object, type

Python iterable and iterator a tutorial

Posted on July 17, 2019October 29, 2020 by mohamad wael

what is an iterable ?

In python , objects are abstraction of data , they have methods that work with data , and help us to manipulate it . If we take a look at a list , and see … Read More

python iterable, iterator, next, python

Sets in python a tutorial

Posted on July 11, 2019November 30, 2020 by mohamad wael

In this tutorial , we will show how to use sets in python . We will start by explaining what is a set. After that we will explain how to use sets , so the various operations that we can … Read More

python set

How To Use The TimeIt Module in python

Posted on July 7, 2019September 26, 2020 by mohamad wael

The timeIt module is used to test how fast our code is . We can use it to compare different functions or classes or just some line of code ,and see how fast they are .Also if we want we … Read More

modules python, speed, testing, timeit, timeit.repeat, timeit.timeit
  • «
  • 1
  • …
  • 8
  • 9
  • 10
Powered by WordPress | Theme: Bootstrap Basic4