meke waradda mokakda machn?

Commex

Well-known member
  • Nov 29, 2019
    2,020
    1,587
    113
    You have been given an incomplete Python program in the answer box below. Please complete the program by filling in the lines as required.

    The program takes as input an integer X, and computes the following formula.

    Y = 4 * X + 14

    If the value of Y is greater than 50, the program should do the following:

    Z = Y * 4

    If the value of Y is less than or equal to 30, the program should do the following:

    Z = Y - 4

    Finally, the value of Z should be printed with print() command.

    Answer penalty regime: 0 %)

    X = int(input())

    Y = X*4 + 14

    #--------TYPE YOUR CODE TO COMPLTE PROGRAM BELOW THIS LINE----------
    if Y > 50:
    Z = Y * 4

    #--------TYPE YOUR CODE TO COMPLTE PROGRAM ABOVE THIS LINE----------
    elif Y <= 30:
    Z = Y - 4

    print(Z)
     

    ලොකු bhai

    Well-known member
  • Jun 18, 2012
    1,163
    1,746
    113
    You have been given an incomplete Python program in the answer box below. Please complete the program by filling in the lines as required.

    The program takes as input an integer X, and computes the following formula.

    Y = 4 * X + 14

    If the value of Y is greater than 50, the program should do the following:

    Z = Y * 4

    If the value of Y is less than or equal to 30, the program should do the following:

    Z = Y - 4

    Finally, the value of Z should be printed with print() command.

    Answer penalty regime: 0 %)


    X = int(input())
    Y = X*4 + 14
    if Y>50:
    Z = Y+4
    else:
    Z = Y*2

    print(Z)


    ona unge system eke solution eka. pissune
     
    • Like
    Reactions: SLBro

    Commex

    Well-known member
  • Nov 29, 2019
    2,020
    1,587
    113
    X = int(input())
    Y = X*4 + 14
    if Y>50:
    Z = Y+4
    else:
    Z = Y*2

    print(Z)


    ona unge system eke solution eka. pissune
    Screenshot_3.jpg

    ne bn :(
     
    • Sad
    Reactions: DHE

    SLBro

    Well-known member
  • Oct 6, 2020
    465
    1,136
    93
    Answer ekanm hari

    3rd line eke thiyena y=... eka 2nd line eke dala submit karla balanna :(
    or empty lines delete karala balnna

    Code:
    X = int(input())
    Y = X*4 + 14
    
    if Y>50:
        Z = Y+4
    else:
        Z = Y*2
      
    print(Z)

    Code:
    X = int(input())
    
    Y = 4 * X + 14
    
    if Y > 50 : Z = Y + 4
    else : Z = Y * 2
    
    print(Z)
     
    Last edited:
    • Love
    Reactions: Commex

    BinDT

    Well-known member
  • Apr 21, 2022
    1,007
    1,585
    113
    Andromeda Galaxy
    Python:
    X=int(input("Input: "))
    Y = 4 * X + 14
    if Y>30:
        Z = Y * 4
    elif Y<=30:
        Z = Y - 4
    print(int(Z))

    oka wada naththam meekath poddak try karapan machan

    Python:
    def main():
        X=int(input("Input: "))
        Y = 4 * X + 14
        cout=check(Y)
        print(int(cout))
    def check(n):
        if n>30:
            Z = n * 4
            return Z
        elif n<=30:
            Z = n - 4
            return Z
        
    
    if __name__=="__main__":
        main()
     
    • Love
    Reactions: Commex

    Commex

    Well-known member
  • Nov 29, 2019
    2,020
    1,587
    113
    Answer ekanm hari

    3rd line eke thiyena y=... eka 2nd line eke dala submit karla balanna :(
    or empty lines delete karala balnna

    Code:
    X = int(input())
    Y = X*4 + 14
    
    if Y>50:
        Z = Y+4
    else:
        Z = Y*2
     
    print(Z)

    Code:
    X = int(input())
    
    Y = 4 * X + 14
    
    if Y > 50 : Z = Y + 4
    else : Z = Y * 2
    
    print(Z)
    111111111111111111111111111111111111.jpg


    macho eka wada kala. ubata pin sidda wenava :love:

    un nm maha karumayak bn.hariyatama un gahapu code eka nathnm oka pass wenna ba.
    ekane bn epa weno :angry:
    ------ Post added on Sep 1, 2022 at 11:47 AM

    Python:
    X=int(input("Input: "))
    Y = 4 * X + 14
    if Y>30:
        Z = Y * 4
    elif Y<=30:
        Z = Y - 4
    print(int(Z))

    oka wada naththam meekath poddak try karapan machan

    Python:
    def main():
        X=int(input("Input: "))
        Y = 4 * X + 14
        cout=check(Y)
        print(int(cout))
    def check(n):
        if n>30:
            Z = n * 4
            return Z
        elif n<=30:
            Z = n - 4
            return Z
       
    
    if __name__=="__main__":
        main()
    thanx bokka.. :love: uda code eka wada kara machn. un dala tiyena vidiyatamane api code eka submit karanna one :sleep:
    ------ Post added on Sep 1, 2022 at 11:48 AM
     
    • Love
    Reactions: SLBro

    ලොකු bhai

    Well-known member
  • Jun 18, 2012
    1,163
    1,746
    113
    View attachment 183137

    macho eka wada kala. ubata pin sidda wenava :love:


    ekane bn epa weno :angry:
    ------ Post added on Sep 1, 2022 at 11:47 AM


    thanx bokka.. :love: uda code eka wada kara machn. un dala tiyena vidiyatamane api code eka submit karanna one :sleep:
    ------ Post added on Sep 1, 2022 at 11:48 AM

    mage eth error ekak enawane bn.

    Hari giyaa.. yakuu e widihatama type karanna onane.
    ------ Post added on Sep 1, 2022 at 12:23 PM
     
    • Like
    Reactions: SLBro and Commex