Giter Site home page Giter Site logo

truth-table-generator's Introduction

Tugas Besar KU1202 Pengantar Rekayasa dan Desain

Sebuah program untuk membuat truth table.

Penggunaan

  1. Jalankan program main.py.
  2. Masukkan perintah "kebenaran" untuk membuat truth table.
  3. Masukkan jumlah basis (minimal dua basis).
  4. Masukkan basis dengan jumlah yang sudah diinput sebelumnya.
  5. Masukkan jumlah output persamaan (mminimal satu persamaan).
  6. Masukkan persamaan dengan jumlah yang sudah diinput sebelumnya. Operasi boolean hanya bisa menggunakan kata-kata yang valid untuk Python. Gunakan tanda kurung untuk operasi "not".

Contoh:

>>> kebenaran  
Masukkan jumlah basis: 3  
Masukkan basis ke-1: X1  
Masukkan basis ke-2: X2  
Masukkan basis ke-3: X3  
Masukkan jumlah output persamaan: 1  
Masukkan persamaan ke-1: X1 and (not X2) or X3  
+----+----+----+-----------------------+  
| X1 | X2 | X3 | X1 and (not X2) or X3 |  
+----+----+----+-----------------------+  
| 0  | 0  | 0  |           0           |  
| 0  | 0  | 1  |           1           |  
| 0  | 1  | 0  |           0           |  
| 0  | 1  | 1  |           1           |  
| 1  | 0  | 0  |           1           |  
| 1  | 0  | 1  |           1           |  
| 1  | 1  | 0  |           0           |  
| 1  | 1  | 1  |           1           |  
+----+----+----+-----------------------+  
  
>>> kebenaran  
Masukkan jumlah basis: 3  
Masukkan basis ke-1: X1  
Masukkan basis ke-2: X2  
Masukkan basis ke-3: X3  
Masukkan jumlah output persamaan: 2  
Masukkan persamaan ke-1: X1 and X2 or X3  
Masukkan persamaan ke-2: (not X1) or X2 and X3  
+----+----+----+-----------------+-----------------------+  
| X1 | X2 | X3 | X1 and X2 or X3 | (not X1) or X2 and X3 |  
+----+----+----+-----------------+-----------------------+  
| 0  | 0  | 0  |        0        |           1           |  
| 0  | 0  | 1  |        1        |           1           |  
| 0  | 1  | 0  |        0        |           1           |  
| 0  | 1  | 1  |        1        |           1           |  
| 1  | 0  | 0  |        0        |           0           |  
| 1  | 0  | 1  |        1        |           0           |  
| 1  | 1  | 0  |        1        |           0           |  
| 1  | 1  | 1  |        1        |           1           |  
+----+----+----+-----------------+-----------------------+  

truth-table-generator's People

Contributors

mhelmih avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.