Questions Coding help

SpinXO

Well-known member
  • Jul 6, 2015
    3,965
    4,644
    113
    Loading...
    Website එකක Footer එකේ Address, Email & Phone number දානකොට font awesome වලින් Symbol එක අරගෙන, එක පෙළට symbol ටික මේ වගේ aline කරගන්නෙ කොහොමද?

    SrkbayL.jpg


    දැනට තියෙන්නෙ මෙහෙම

    Code:
    <i class="fa fa-map-marker" aria-hidden="true"></i> Address.
    
    <i class="fa fa-envelope" aria-hidden="true"></i> [email protected]
    
    <i class="fa-solid fa-mobile-screen-button"></i> +94 712345678

    @siri_ayya
     
    Last edited:

    හෙළයෙක්

    Well-known member
  • Apr 26, 2014
    48,467
    98,407
    113
    Na. Wordpress
    hari css framwork eka bootrap athe ehenan mama ekata gelapana answer eka denan


    HTML:
    <div class="d-flex flex-column mb-3">
        <div class="p-2">
            <i class="fa fa-map-marker" aria-hidden="true"></i>
            <span>Address.</span>
        </div>
        
        <div class="p-2">
            <i class="fa fa-envelope" aria-hidden="true"></i>
              <span>[email protected]</span>
        </div>
        
        <div class="p-2">
            <i class="fa-solid fa-mobile-screen-button"></i>
              <span>+94 712345678</span>
        </div>
      
      </div>

    xlHB2jC.png
     

    SpinXO

    Well-known member
  • Jul 6, 2015
    3,965
    4,644
    113
    Loading...
    hari css framwork eka bootrap athe ehenan mama ekata gelapana answer eka denan


    HTML:
    <div class="d-flex flex-column mb-3">
        <div class="p-2">
            <i class="fa fa-map-marker" aria-hidden="true"></i>
            <span>Address.</span>
        </div>
     
        <div class="p-2">
            <i class="fa fa-envelope" aria-hidden="true"></i>
              <span>[email protected]</span>
        </div>
     
        <div class="p-2">
            <i class="fa-solid fa-mobile-screen-button"></i>
              <span>+94 712345678</span>
        </div>
     
      </div>

    xlHB2jC.png

    @හෙළයෙක් මචන් ඔය code එක හරි ගියෙ නැහැ. Symbol එකයි, text ටිකයි වෙනම හරියට එන්නෙ නැහැ. මේ සයිට් එකේ Footer එක බලන්න. ඒ වගේ Get in touch section එක වෙන් කරලා පිළිවෙලට හදා ගන්න ඕනි.

    https://brandploy.com/
     

    හෙළයෙක්

    Well-known member
  • Apr 26, 2014
    48,467
    98,407
    113
    @හෙළයෙක් මචන් ඔය code එක හරි ගියෙ නැහැ. Symbol එකයි, text ටිකයි වෙනම හරියට එන්නෙ නැහැ. මේ සයිට් එකේ Footer එක බලන්න. ඒ වගේ Get in touch section එක වෙන් කරලා පිළිවෙලට හදා ගන්න ඕනි.

    https://brandploy.com/
    aula thiyene machan uba oka use karana thana thawa libs ehema use wenawa athi ewagen override wenawa athi kiyala hithene.

    https://www.begindot.com/best-footer-wordpress-plugins/

    me wage plugin ekakin karagana try ekak dalabalan machan. ubata code tika huru wenawata wada ikamanata oka use karana puluwan wei.
    ------ Post added on Nov 4, 2022 at 9:58 PM
     
    • Like
    Reactions: SpinXO

    SpinXO

    Well-known member
  • Jul 6, 2015
    3,965
    4,644
    113
    Loading...

    dsasa

    Member
    Oct 6, 2023
    1
    0
    1
    In this assignment you will write a computer program from scratch using the Python programming language. This program will function as a simple calculator.

    Objectives

    • Write a simple Python program that performs arithmetic operations based on the user input
    Stage 1: A simple calculator

    Your calculator should provide the following arithmetic and control operations.
    • Arithmetic Operations
      • Addition (+) add(a,b)
      • Subtraction (-) subtract(a,b)
      • Multiplication (*) multiply(a,b)
      • Division (/) divide(a,b)
      • Power (^) power(a,b)
      • Remainder (%) remainder(a,b)
    • Control Operations
      • Terminate (#)
      • Reset ($)
    Write a function select_op(choice) to select the appropriate mathematics function based on the users selection.
    The behavior of the program should be as follows:
    • The program should ask the user to specify the desired operation (addition/subtraction/multiplication/division/power/remainder/terminate/reset). You can start with the code already given in the answer box. Also, check the example test cases given below.
    • Once the user inputs/selects an arithmetic operation, the program should ask the user to enter the two operands one by one, separated by Enter key. If the user made a mistake while entering the parameters, he can return to main menu by pressing ‘$’ key at the end of the input string, followed by the Enter key
    • Calculate the result and display the result. Inputs need to be processed as floating point values, even thought the values entered are integers. Example: 2.0 + 4.0 = 6.0
    • Return to main menu after displaying the calculation result
    • All possible errors (at input or at generation of result) should be handled by the program
      • Examples:
    • Anything other than a number as operand input
    • Anything other than +, -, *, /, ^ and % as arithmetic operators
    • Anything other than # and $ as control operators
    • Division by zero
    • The program should keep running until it is stopped by the user (using the terminate command #)
    Task 1: Get user input
    • Section 1:
    • Input Arithmetic operation
    • Reset or Termination
    • Section 2:
    • Input first operand
    • Input second operand
    • Reset or Termination
    Task 2: Implement functions that performs given arithmetic operation on the given operands and produces the result
    • Arithmetic operation and the two operands as parameters
    • Return the result of the arithmetic operation
    Task 3: Call the calculation function by passing user input to select_op(choice) and display the result from within the select_op(choice) function
    Here are some of the messages you might want to display to the users at certain occasions. Copy and paste them as necessary in your code in appropriate situations to help with auto-grading. If there is any differences between the output of your code and the expected output, it will be displayed once you click the "Check" button. You can click on "Show differences" button to highlight the difference between outputs. This will be helpful for you to change your code to match the expected output.


    "Enter first number: "
    "Enter second number: "
    "Not a valid number,please enter again"
    "Unrecognized operation"
    "Something Went Wrong"
    Some common issues and solutions are explained in This Forum Post


    For example:

    InputResult
    #Select operation.
    1.Add : +
    2.Subtract : -
    3.Multiply : *
    4.Divide : /
    5.Power : ^
    6.Remainder: %
    7.Terminate: #
    8.Reset : $
    Enter choice(+,-,*,/,^,%,#,$): #
    Done. Terminating
    +
    2
    4
    #
    Select operation.
    1.Add : +
    2.Subtract : -
    3.Multiply : *
    4.Divide : /
    5.Power : ^
    6.Remainder: %
    7.Terminate: #
    8.Reset : $
    Enter choice(+,-,*,/,^,%,#,$): +
    Enter first number: 2
    Enter second number: 4
    2.0 + 4.0 = 6.0
    Select operation.
    1.Add : +
    2.Subtract : -
    3.Multiply : *
    4.Divide : /
    5.Power : ^
    6.Remainder: %
    7.Terminate: #
    8.Reset : $
    Enter choice(+,-,*,/,^,%,#,$): #
    Done. Terminating
    /
    5
    0
    #
    Select operation.
    1.Add : +
    2.Subtract : -
    3.Multiply : *
    4.Divide : /
    5.Power : ^
    6.Remainder: %
    7.Terminate: #
    8.Reset : $
    Enter choice(+,-,*,/,^,%,#,$): /
    Enter first number: 5
    Enter second number: 0
    float division by zero
    5.0 / 0.0 = None
    Select operation.
    1.Add : +
    2.Subtract : -
    3.Multiply : *
    4.Divide : /
    5.Power : ^
    6.Remainder: %
    7.Terminate: #
    8.Reset : $
    Enter choice(+,-,*,/,^,%,#,$): #
    Done. Terminating
    Answer:(penalty regime: 0 %)
    Ace editor not ready. Perhaps reload page?
    Falling back to raw text area.