Skip to main content

Pseudo code



  • Pseudo-code is a tool that can be used to express algorithms more precisely
  • Pseudo-code is a combination of programming code and ordinary English
  • Pseudo-code allows algorithms to be specified precisely without having to worry about programming language syntax
  • There is currently no firmly established standard for Pseudo Code
  • Pseudo-code is not actually executed on a computer, it simply provides a means for programmers to "Think out" their programs before they implement them
  • A carefully prepared pseudo code program can be easily converted to a programming language such as C++ or Java.
  • HOW TO WRITE PSEUDO CODE?
    • Any algorithm will eventually need to have its instructions performed by a computer
    • For this reason the keywords used in Pseudo code are based on the main functions fo a computer.
  • Rules for Pseudo-code
    • INPUT
      • READ get input from a file
      • GET    get input from the keyboard
    • ARITHMETIC / CALCULATIONS
      • +_ * / ( ) =
    • OUTPUT
      • PRINT output to a printer
      • WRITE output to a file
      • DISPLAY output to a monitor
    • STORE
      • SET total_price to 0
      • total_price = cost_price + tax
    • COMPARE
      • IF student is part time THEN ADD 1 to part time ELSE ADD 1 to full time ENDIF
    • REPETITION
      • DOWHILE student_total < 50 READ student_record ADD 1 to student_total ENDDO
      • WHILE student_total < 50 READ student_record ADD 1 to student_total ENDWHILE
  • Examples


Comments

Popular posts from this blog

A basic Arduino Solar PV Monitor

I have just recently had solar pv installed, mainly to future proof my energy costs, I do not expect it to be like drilling for oil in my back garden, however the return looks to be encouraging. The install gives you another single unit meter, from this you will see the total amount the panels produce, but that is about it. I wanted to know how much the production was as it was happening, I discovered the light blinks on the front of the meter will flash 1000 times for each kWh of electricity which passes through. The rate of the flashing of the LED tells you how much power is currently passing through the meter. [ ]

Schematic Audio Amplifier with IC AN7102S

This Schematic use IC AN7102S , this is setereo amplifier and have output speaker 7,5 mW with impedance 32 Ohm . Supply need 1Volt to 3 Volt , wow this amplifier low voltage. You can use this amplifier on radio is use battery . With just one battery with voltage 1,5 Volt you can play this amplifier. See this Schematic below : Click to Enlarge Datasheet IC AN7102S Vcc                   =  1-3 V Pout                 = 2X 7,5 mW RL                    = 32 Ohm Ft                      = 20hz - 20Khz Icco                  = 7 mA Package         = DIP-18 Manufactered = MATSUSHITA