Giter VIP home page Giter VIP logo

bitcamp's Introduction

Tip Calculator

კითხვები

  1. ჩეკის ოდენობა / bill amount
  2. თიფის % / tip rate
  3. სრული ოდენობა / total
  4. რა უნდა ვკითხოთ იუზერს / Prompt / Input
  5. რა უნდა გამოჩნდეს ეკრანზე პროგრამის ჩართვისას? / display
  6. რა უნდა გამოიტანოს პროგრამამ პასუხად? / Output / display

ტექნიკური დავალება

შექმენი მარტივი თიფ კალკულატორი. პროგრამამ უნდა გკითხოს ჩეკის რაოდენობისა და თიფის პროცენტის შესახებ. პროგრამამ უნდა დათვალოს თიფი და შემდეგ თიფი და სრული ოდენობა გამოიაჩინოს ეკრანზე.

What is the bill? $200 What is the tip percentage? 15 The tip is $30 The total is $230

Inputs, Processes, Outputs

არსებითი სახელები:

  • ჩეკის რაოდენობა / bill amount
  • თიფის პროცენტი / tip rate
  • თიფი / tip amount
  • სრული ოდენობა / total amount

ზმნები:

  • კითხვა / prompt
  • დათვლა / compute
  • გამოაჩინოს / display

Inputs: bill amount, tip rate Proccesses: დათვლა Outputs: tip amount, total amount

TDD - Test Driven Development - Tests

ტესტის გეგმა #1: inputs: - bill amount: 10 - tip rate: 15 Expected result: - Tip: 1.50 - Total: 11.50

ტესტის გეგმა #2 - დამრგვალების ტესტი: inputs: - bill amount: 11.25 - tip rate: 15 Expected result: - Tip: 1.69 - Total: 12.94

ფსევდოკოდი - Pseudocode

TipCaluclator Initialize billAmount to 0 Initialize tip to 0 Initialize tipRate to 0 Initialize total to 0

Prompt for billAmount with "What is the bill amount?"
Prompt fot tipRate with "What is the tip rate?"

convert billAmount to a number
covnert tipRate to a number

tip = billAmount * (tipRate / 100)
round tip up to nearest cent
total = billAmount + tip

Display "Tip: $" + tip
Display "Total: $" + total

End

bitcamp's People

Contributors

bachosulava 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.