473,387 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Confusing

2
Expand|Select|Wrap|Line Numbers
  1. def mySlicer (x, y, z):
  2.     result = ""
  3.     x1 = 0
  4.     if y > len(z):
  5.         y = len(z)
  6.     while y - x1 >= len(result):
  7.         if x1 < y:
  8.             result = result + z[x]  
  9.             x = x + 1
  10.             x1 = x1 + 1
  11.  
  12.         print result
What´s the problem?
Cheers
Nov 19 '08 #1
3 1328
Curtis Rutland
3,256 Expert 2GB
What do you mean, where's the problem?

You shouldn't just dump code on the experts here without providing at least your output and error messages, if any.

Also, you need a more descriptive title. I'd change it for you, but since you haven't explained your problem, I don't know what to change it to.

Also, please use [code] tags, when you post code. When you do, you preserve your indention, which is important in python.

MODERATOR
Nov 19 '08 #2
Koggis
2
What do you mean, where's the problem?

You shouldn't just dump code on the experts here without providing at least your output and error messages, if any.

Also, you need a more descriptive title. I'd change it for you, but since you haven't explained your problem, I don't know what to change it to.

Also, please use [code] tags, when you post code. When you do, you preserve your indention, which is important in python.

MODERATOR
Btw you can just delete the thread.
Thanks
Nov 19 '08 #3
Curtis Rutland
3,256 Expert 2GB
Are you sure? If you give some more information I'll help you clean it up...or did you solve it yourself?
Nov 19 '08 #4

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

Similar topics

2
by: Marc | last post by:
Hi all, I was using Tkinter.IntVar() to store values from a large list of parts that I pulled from a list. This is the code to initialize the instances: def initVariables(self): self.e =...
2
by: David MacQuigg | last post by:
I'm setting up a large hierarchy of module packages and using a variable to select which of many alternative packages to import. For example, the variable 'config.modsel' points to a particular...
1
by: MLH | last post by:
mysql -h host -u user -p Running the above command expects actual values to be substituted for host and user. User I know about. That can be root. And now I know that this root has NOTHING to do...
4
by: Mark | last post by:
I'm struggling with how to properly name a specific subset of Properties in my classes. An example will illustrate it best. Let's say you have a class named Person with the code below. Each...
2
by: Glenn | last post by:
Hi! I've developed an app that displays multiple textbox and combobox fields (most of which are autopostback) on a form along with a submit button. My users find it confusing when they change...
1
by: Justin Richeson via .NET 247 | last post by:
(Type your message here) Ok...wow...this is really confusing, but I think it's similar towhat I'm trying to do. I'm looking to create a program thatwill search a "plugins" subdirectory (from where...
2
by: d3vkit | last post by:
Okay so I can NOT get my while loop to work. It's the most confusing thing I've ever come across. It was working fine and then suddenly, nothing. No error. The page just dies. I am using PHP5 with...
11
by: !truth | last post by:
Hi, i feel confused about the following program, and it's works to get a pointer-member's address. #define NETDEV_ALIGN 32 #define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1) ...
11
by: James R. Davis | last post by:
Yes, a newbie here. Though I am making progress, slowly, I am also getting more and more confused. With ASP, when I wanted to do something as trivial as updating a visitor counter, I...
7
by: Andy B | last post by:
I saw this in the set accessor of a property: Set(ByVal value As DataSet) What exactly does the stuff in the () mean? VS complained about it not being there when I took it out not knowing...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...

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.