473,473 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Creating 26 A's followed by another 26 B's up to 26 Z's

1 New Member
Creating 26 A's followed by another 26 B's up to 26 Z's
Jun 23 '15 #1
2 1346
kiseitai2
93 New Member
Could you post some code samples of what you have tried?
Jun 23 '15 #2
computerfox
276 Contributor
I don't exactly see a question. Are you getting an error?

Here's a sample in Python:
Expand|Select|Wrap|Line Numbers
  1. #!/bin/python
  2. import random;
  3.  
  4. def right_pad(mstr,mlen,mpad):
  5.  final="";
  6.  if len(mstr) < mlen:
  7.   i=len(mstr);
  8.   while i < mlen:
  9.    final=final+mpad;
  10.    i+=1;
  11.   return mstr+final;
  12.  else:
  13.   return mstr.substr(0,mlen);
  14.  
  15. class class26:
  16.  id=None;
  17.  max=26;
  18.  chars_raw="A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z";
  19.  chars=chars_raw.split(",");
  20.  
  21.  def __init__(self):
  22.   self.id=right_pad(str(random.randint(20,1000)),10,"0");
  23.  
  24.  def run(self):
  25.   i=0;
  26.   while i<len(self.chars):
  27.    j=0;
  28.    row_str="";
  29.    while j<self.max:
  30.     row_str=row_str+self.chars[i];
  31.     j+=1;
  32.    print row_str;
  33.    i+=1;
  34.  
  35. session=class26();
  36. print session.id;
  37. session.run();
  38.  
http://cp.abelgancsos.com/project.php?id=410
http://cp.abelgancsos.com/project.php?id=411
Please note that we will not do your homework/classwork/work assignment for you.
Jun 23 '15 #3

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

Similar topics

1
by: santhosh_176 | last post by:
:I Created a Pocket PC application for iPAQ 5450. Every thing went fine even installer creation. I could run the setup and install it into the actual device and worked fine. The application enables...
39
by: Randell D. | last post by:
Folks, I'm sure this can be done legally, and not thru tricks of the trade - I hope someone can help. I'm writing a 'tool' (a function) which can be used generically in any of my projects. ...
0
by: James Fortune | last post by:
Here is an example of Access creating a single page PDF file. The text in the textbox is scaled to fit horizontally into a grey box 100 pixels wide that is fontsize pixels high. Clicking the...
44
by: Greg Strong | last post by:
Hello All, Is it better to create a query in DAO where a report has 4 sub-reports each of whose record source is a query created at runtime and everything is in 1 MDB file? From what I've...
8
by: David W. Simmonds | last post by:
Is there an easy way to create a new browser window from C# and ASP.NET? I would just like to have a popup window without any menus or toolbars that would contain a high-res image. The low-res...
4
by: Curious Coder | last post by:
I have been tasked with a project that I do not think can be accomplished. Our company has an application that runs as an unmanaged ActiveX control on user desktops. It is designed to work with...
1
by: Marcel Hug | last post by:
Hi NG ! I have already written a task about MVC and I tried to get the best informations together. I would like to implement the MVC pattern and it work on the way I did it. At first i know the...
5
by: Marcin Gil | last post by:
Hi! I have the code like this (obvious things like ctor/dtor removed) typedef struct _NODE { int val; int index; } Node;
1
by: Totti | last post by:
Hello, I am new to MS Access (2007) and am trying to create a hyperlink in a table to Google maps without much luck. The URL I need to use in my hyperlink is...
0
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,...
0
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...
1
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...
0
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,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
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.