473,830 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Blackjack Code Help!!

6 New Member
Hi.

I have made a blackjack code and need a some help on it. It seems to work overall but there are a few bits here and there that need sorting out, and I'm kinda stuck on it so was wondering if I could get some help? (Would be HUGELY appreciated )

The things I need help are on:

- Stopping the program going back to the code (you will know what I mean when you play it)
- How to add the re-run code in it and where
- How I can count the ace as 1 and 11 (as in my code it only counts as 11)
- How I can add the different suites like diamonds, clubs, hearts and spades, because my program only displays the numbers not the suites with it
- How I can show the cards played after each round
- How I can shuffle the cards
- How I can track what cards have been dealt so that each card is only dealt once

My code is here is attached.

Thanks in advance
Jan 8 '09
11 2116
bvdet
2,851 Recognized Expert Moderator Specialist
@ThaRealneSS
Not really. Are you running the script from your Python editor or from the command prompt?
Jan 9 '09 #11
ThaRealneSS
6 New Member
@bvdet
From the Python Editor.
Jan 9 '09 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1247
by: Stephen | last post by:
I was wondering if someone could please help me with an array I'd like to create in an asp.net page. I have to design an array which stores the values of addresses manually entered into textboxes (txtAdd,txtCity&txtPostcode). The array must hold the values of these three textboxes. I would like the array to also display these address values in an asp:Lable within a asp:TableCell inside a asp:Table. I want all this to happen on the...
9
2418
by: hope | last post by:
Hi Access 97 I'm lost on this code please can you help ================================= Below is some simple code that will concatenate a single field's value from multiple records into a single string separated by a user defined character. There is no error trapping (by design), USE AT YOUR OWN RISK.
4
2832
by: Terencetrent | last post by:
I having been using Access '97/2002 for about 4 years now and have never really had the need or the time to learn visual basic. Well, I think the time has finally come. I need help with Visual Basic code that will examine numeric value for a particular field in a query, and assign a new numeric vaule to that field. There are over 21 possible values and I am told that IIF statement will only handle 9 of the possibilities and that I need...
3
25062
by: Mads Petersen | last post by:
I'm stuck in this code. Hope you can and will help me. I launch it from excel. I have made the following code work, but not as i whant. I need the ranges to be working with something like xlDown. eg. this only transferes the first record in the area. ..Fields("Uge").Value = ws.Range("A98").Value Sub SelectMaster()
5
1304
by: deercreek | last post by:
I could use a little help from a good code writer out there. I found some code and modified it a bit for my needs but, I need a little help to finish it up. What I am trying to due is to get a number to fill out a text box on my form. I want it to look at the form and get the CampStartDate and my CampEndDate also to look at a table of holidays. Then I want the text box to be filled with the number of days they will be staying that do not...
30
9153
by: imran akhtar | last post by:
i have a balckjack code, which does not seem to run, in python, it comes up with syntax error, i have try sortng it out. does not seem to work. below is my code, if anyone can work out wht wrong with it. that will be great. thereis an attched file, to see the code more cleaer. from random import choice as randomcards def total(hand): # how many aces in the hand aces = hand.count(11) # to complicate things a little the...
9
7364
by: Chris Ahmsi | last post by:
I have been tasked to create a 'simple' form in Access providing managers to input necessary changes. I have 2 command buttons on the form and a check box. Command button 1 updates my table for multiple entries, and command button 2 e-mails the table in HTML format to my team, appends the data entered to a back-up table, and deletes the entries on the current table. When the check box on my form is checked (indicating a permanent change) I...
20
1950
by: 16800960 | last post by:
The Code is as Follows bool findTitlePrice(string allTitles, double allPrices, int totalRec, string title, double & price) { for(int i=0; i < totalRec; i++) { // your code here: // for each element of array allTitles, check if it matches // the given title, i.e. if title and allTitles are the same;
1
2974
by: Joshua T | last post by:
I am not very good with MySQL server side scripts. So any help would be awesome! My database info is as follows: <?php define('DB_HOST', 'pingback.db.5645640.hostedresource.com'); define('DB_USER', 'pingback'); define('DB_PASSWORD', 'Wind**p1'); define('DB_DATABASE', 'pingback'); ?> This is how my sql is setup:
0
9641
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10769
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10479
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10523
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10199
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9312
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7741
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5778
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3956
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.