ŠŠµŠ¼Š¾Š³Ńƒ ŠæŠ¾Š½ŃŃ‚ŃŒ Š·Š°Š“Š°Ń‡Šø | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

ŠŠµŠ¼Š¾Š³Ńƒ ŠæŠ¾Š½ŃŃ‚ŃŒ Š·Š°Š“Š°Ń‡Šø

Š˜ŃŠæŠ¾Š»ŃŒŠ·ŃƒŃ Š±Š°Š½ŠŗŠ¾Š¼Š°Ń‚, ŠŗŠ»ŠøŠµŠ½Ń‚Ń‹ Š¼Š¾Š³ŃƒŃ‚ ŠæŠ¾Š»ŃƒŃ‡Šøть Š“Š¾ŃŃ‚ŃƒŠæ Šŗ сŠ²Š¾ŠøŠ¼ Š±Š°Š½ŠŗŠ¾Š²ŃŠŗŠøŠ¼ Š²ŠŗŠ»Š°Š“Š°Š¼ ŠøŠ»Šø ŠŗрŠµŠ“ŠøтŠ½Ń‹Š¼ счŠµŃ‚Š°Š¼ Š“Š»Ń Š²Ń‹ŠæŠ¾Š»Š½ŠµŠ½Šøя рŠ°Š·Š»ŠøчŠ½Ń‹Ń… фŠøŠ½Š°Š½ŃŠ¾Š²Ń‹Ń… Š¾ŠæŠµŃ€Š°Ń†ŠøŠ¹. Š’Ń‹ Š¾Š±ŃŠ»ŃƒŠ¶ŠøŠ²Š°ŠµŃ‚Šµ Š±Š°Š½ŠŗŠ¾Š¼Š°Ń‚Ń‹, ŠŗŠ¾Ń‚Š¾Ń€Ń‹Šµ ŠæрŠøŠ½ŠøŠ¼Š°ŃŽŃ‚ тŠ¾Š»ŃŒŠŗŠ¾ Š±Š°Š½ŠŗŠ¾Š²ŃŠŗŠøŠµ ŠŗŠ°Ń€Ń‚Ń‹ Visa Šø Amex. Š”Š°Š½Š½Š°Ń ŠæрŠ¾Š³Ń€Š°Š¼Š¼Š° ŠæрŠøŠ½ŠøŠ¼Š°ŠµŃ‚ тŠøŠæ Š±Š°Š½ŠŗŠ¾Š²ŃŠŗŠ¾Š¹ ŠŗŠ°Ń€Ń‚Ń‹ Š² ŠŗŠ°Ń‡ŠµŃŃ‚Š²Šµ Š²Ń…Š¾Š“Š½Ń‹Ń… Š“Š°Š½Š½Ń‹Ń…. Š—Š°Š“Š°Ń‡Š° Š—Š°Š²ŠµŃ€ŃˆŠøтŠµ ŠæрŠ¾Š³Ń€Š°Š¼Š¼Ńƒ, чтŠ¾Š±Ń‹ Š²Ń‹Š²Š¾Š“Šøть "accepted", ŠµŃŠ»Šø ŠŗŠ°Ń€Ń‚Š° Visa ŠøŠ»Šø Amex. Š’ ŠæрŠ¾Ń‚ŠøŠ²Š½Š¾Š¼ сŠ»ŃƒŃ‡Š°Šµ Š½Šµ Š²Ń‹Š²Š¾Š“ŠøтŠµ Š½ŠøчŠµŠ³Š¾. ŠŸŃ€ŠøŠ¼ŠµŃ€ Š’Ń…Š¾Š“Š½Ń‹Ń… Š”Š°Š½Š½Ń‹Ń… Amex ŠŸŃ€ŠøŠ¼ŠµŃ€ Š’Ń‹Ń…Š¾Š“Š½Ń‹Ń… Š”Š°Š½Š½Ń‹Ń… accepted https://code.sololearn.com/cOEzzs2rQs53/?ref=app

14th Sep 2021, 9:34 PM
Yaroslav Kirkivskyy
Yaroslav Kirkivskyy - avatar
4 Respostas
+ 6
Yaroslav Kirkivskyy card1= "visa" card2 = "amex"
15th Sep 2021, 3:45 AM
BroFar
BroFar - avatar
+ 1
Hi Yaroslav! I don't know your language so I'm using English. You can't compare a normal text with a string. Strings are declared using double(" ") or single quotes(' ').I mean the text must be quoted. So, your card1, card2 variables need to be like this, card1 = "Visa" ; card2 = "Amex"
15th Sep 2021, 3:17 AM
Python Learner
Python Learner - avatar
0
type = input() #Š²Š°Ńˆ ŠŗŠ¾Š“ card= "visa" or "anex" if ('card=visa' or 'card=anex'): print ("accepted") else: print("wrong")
24th Dec 2021, 6:58 AM
Asty
Asty - avatar
0
type = input() #Š²Š°Ńˆ ŠŗŠ¾Š“ if type == 'Visa': print ("accepted") if type == 'Amex': print ("accepted") else: print("") The simplest code
2nd Jan 2022, 1:17 PM
mr.fenomen
mr.fenomen - avatar