Stats: 3,173,066 members, 7,887,061 topics. Date: Thursday, 11 July 2024 at 08:15 PM |
Nairaland Forum / Science/Technology / Programming / Acey Deucey Python And Just Basic Code (1350 Views)
I Seriously Want To Learn CSS, HTML, Python And Javascript / If You Are To Advice Between Python And Java, Which Would You Pick? / Making A Bot In Python And Django (2) (3) (4)
Acey Deucey Python And Just Basic Code by ABCthingx: 1:21pm On Dec 11, 2019 |
Here is the code in Just Basic:
|
Re: Acey Deucey Python And Just Basic Code by ABCthingx: 12:09pm On Dec 14, 2019 |
It was too buggy and too long so I had too recode it in python. I don't know why Javanians and Pythonians hate the "Goto" keyword is I had to find a way about it. |
Re: Acey Deucey Python And Just Basic Code by ABCthingx: 12:10pm On Dec 14, 2019 |
#ACEY DUCEY CARD GAME #COMMENT FOR LATER: TO SHO IN GOOGLE USE ACEY DEUCEY TITLE import random print("ACEY DUCEY CARD GAME" ![]() print("TWO CARDS ARE PLACED BEFORE YOU AND YOU BET WHETHER THE THRID CARD WILL BE IN RANGE OR NOT" ![]() print("YOUR BET MUST NOT MATCH THE THRID" ![]() print("for newbies jack = 11, queen = 12, king = 13 and ace = 14" ![]() D = 500 #money while (D > 100): def getCard(): #card x = random.randint(2, 14) return(x) A = getCard()#first card B = getCard()#second card while (A > B): A = getCard()#first card B = getCard()#second card def fun(x): #function is to convert no to string when printed if (x == 11): x = "JACK" if (x == 12): x = "QUEEN" if (x == 13): x = "KING" if (x == 14): x = "ACE" return(x) def match(x): if (A <= x <= B): x = "true" else: x = "false" # print(x) return (x) C = getCard()#third card #for i in range(3): print (" YOU HAVE " + str(D) + " NAIRA" ![]() print (fun(A)) print (fun(B)) # print (C) E = int(input("YOUR GUESS: " ![]() print ("CARD; " + str(C)) if (E != C ): if (match(C) == match(E)): print ("YOU WIN" ![]() D = D + 100 else: print ("YOU LOSE" ![]() D = D - 100 else: print ("GOTCHA! -200" ![]() D = D - 200 print("YOU'RE' NOW PENNYLESS" ![]() print ("Game Out" ![]() |
Re: Acey Deucey Python And Just Basic Code by ABCthingx: 12:14pm On Dec 14, 2019 |
Don't be fool those icons aren't winking at you.They are semi-colons and brackets. I don't know why some thing clearly marked as code will have similes? ![]() |
Re: Acey Deucey Python And Just Basic Code by ABCthingx: 12:18pm On Dec 14, 2019 |
For those that are too lazy to copy I got you covered but you have to login in to download it.
|
Re: Acey Deucey Python And Just Basic Code by ABCthingx: 11:11pm On Dec 14, 2019 |
[font=system] Testing the System font[/system] |
Re: Acey Deucey Python And Just Basic Code by ABCthingx: 11:11pm On Dec 14, 2019 |
Testing the System font |
(1) (Reply)
Download 18 Python Programming Books For Beginners And Veterans / Who Know How To Configure Mdaemon For : / Africa's Sexy Tech: Death By Innovation?
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 21 |