Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: Sublist/ Subarray into string Python
Post: RE: Sublist/ Subarray into string Python
Wow it function perfectly, thank you a lot!
(Apr-23-2021, 06:44 PM)perfringo Wrote: Something like this?:
>>> list_ = [5, 1, 1]
>>> print(' + '.join([str(i) for i in list_]))
5 ... |
|
SantiagoPB |
General Coding Help |
2 |
2,125 |
Apr-23-2021, 07:03 PM |
|
|
Thread: Sublist/ Subarray into string Python
Post: Sublist/ Subarray into string Python
I have a little problem , I have this code and I need to convert the final print to a string, to be able to printthe final results in different lines and change the separator "," to a "+". If someone ... |
|
SantiagoPB |
General Coding Help |
2 |
2,125 |
Apr-23-2021, 06:33 PM |
|
|
Thread: Position after given movements
Post: RE: Position after given movements
(Apr-18-2021, 08:43 PM)Larz60+ Wrote: Quote:but I do not get the result that it should give
What do you get, and what are you expecting?
I put the link to the task, there you can check what I need t... |
|
SantiagoPB |
Homework |
3 |
2,370 |
Apr-18-2021, 08:47 PM |
|
|
Thread: Position after given movements
Post: Position after given movements
Hello everybody,
I have a task that I don't quite understand how to tackle.
At the moment I have written this code but I do not get the result that it should give, I leave the code:
movement = str(i... |
|
SantiagoPB |
Homework |
3 |
2,370 |
Apr-18-2021, 07:22 PM |
|
|
Thread: Recursion and permutations: print all permutations filling a list of length N
Post: RE: Recursion and permutations: print all permutat...
(Apr-08-2021, 09:47 PM)GOTO10 Wrote: (Apr-08-2021, 09:17 PM)SantiagoPB Wrote: I am trying to give the length of the list using n variable
I guess what I mean is, "Why did you think this would work... |
|
SantiagoPB |
Homework |
6 |
3,262 |
Apr-09-2021, 06:48 AM |
|
|
Thread: Recursion and permutations: print all permutations filling a list of length N
Post: RE: Recursion and permutations: print all permutat...
(Apr-08-2021, 08:28 PM)GOTO10 Wrote: Your line 12 isn't accomplishing anything. What are you trying to do there?
single_list = []
multiplied_list = [] * 10
print(f'Single: {single_list}')
print(f'... |
|
SantiagoPB |
Homework |
6 |
3,262 |
Apr-08-2021, 09:17 PM |
|
|
Thread: Recursion and permutations: print all permutations filling a list of length N
Post: Recursion Coding Error
Hello everyone **biggrin** ,
I have written a code using recursion, which follows the following rules:
RULES
2 inputs:1st input: define the length of the output, as an integer.
2nd input: write ... |
|
SantiagoPB |
Homework |
6 |
3,262 |
Apr-08-2021, 12:15 PM |
|
|
Thread: Recursion and permutations: print all permutations filling a list of length N
Post: Recursion and permutations: print all permutations...
Hello everyone **biggrin** ,
I have written a code and I need to add a condition.
The condition is to give the length of the list, for example, if the output list must be composed of N elements.
In... |
|
SantiagoPB |
Homework |
6 |
3,262 |
Apr-06-2021, 08:01 PM |
|
|
Thread: Palindromes - Python Help
Post: Recursion with Palindromes Python
Hello everyone **biggrin** ,
I have a recursion statement with python **angel** .
STATEMENT
PALINDROMES
A palindrome is a word which reads the same backwards as forwards (madam, noon, radar…). W... |
|
SantiagoPB |
Homework |
5 |
2,586 |
Apr-04-2021, 05:20 PM |
|
|
Thread: Help with Python - Palindromes
Post: RE: Help with Python - Palindromes
(Apr-04-2021, 02:27 PM)ndc85430 Wrote: You don't have a call to print anywhere.
Also, the if and else in check_palin are redundant.
I need to call the function to can see the result if it works go... |
|
SantiagoPB |
General Coding Help |
4 |
2,286 |
Apr-04-2021, 02:37 PM |
|
|
Thread: Help with Python - Palindromes
Post: Help with Python - Palindromes
Hello everyone,
I have a problem with getting the result of my program **confused** .
This is a task on palindromes.
STATEMENT
Write a program which reads a string and prints all palindromes, whic... |
|
SantiagoPB |
General Coding Help |
4 |
2,286 |
Apr-04-2021, 02:05 PM |
|
|
Thread: Palindromes - Python Help
Post: Palindromes - Python Help
Hello everyone **biggrin** ,
I have a task to do and I have the code, but with some problems.
The task is:
Write a program which reads a string and prints all palindromes, which can be obtained by... |
|
SantiagoPB |
Homework |
5 |
2,586 |
Apr-04-2021, 10:40 AM |
|
|
Thread: Palindromes - Python Help
Post: RE: Palindromes - Python
Hello, thank for your replay, but my program try to find this:
input: kayak
Output: kayak
kaak
kak
kyk
aa
kk
All palindroms that you can make with an input string, doesn't matter if the word that ... |
|
SantiagoPB |
Homework |
5 |
2,586 |
Apr-04-2021, 10:23 AM |
|
|
Thread: Palindromes - Python Help
Post: Palindromes - Python
Hello everyone **biggrin** ,
I have a problem with my code.
I must write a program that reads a string and from it obtain all the palindromes that can be obtained.
It must not write palindromes l... |
|
SantiagoPB |
Homework |
5 |
2,586 |
Apr-04-2021, 08:31 AM |
|
|
Thread: Little help with my code - Linked List
Post: Little help with my code - Linked List
Hi everyone **biggrin** , I'm Santiago,
I have a small problem that I cannot detect in my code **confused** .
It is a homework from the university **cool** .
I have all the code written and it ... |
|
SantiagoPB |
Homework |
1 |
2,136 |
Mar-14-2021, 11:57 AM |
|
|
Thread: LinkedList by User Input
Post: RE: LinkedList by User Input
(Mar-03-2021, 07:49 PM)deanhystad Wrote: What will data be when the user enters -1? How can you use that information to break out of the input loop?
The program should work as follows for inputs:
... |
|
SantiagoPB |
General Coding Help |
5 |
3,794 |
Mar-03-2021, 09:19 PM |
|
|
Thread: LinkedList by User Input
Post: RE: LinkedList by User Input
(Mar-03-2021, 06:58 PM)deanhystad Wrote: You should not be asking for how many elements. Input is supposed to end when the user enters -1. At least that is my interpretation of the instructions. ... |
|
SantiagoPB |
General Coding Help |
5 |
3,794 |
Mar-03-2021, 07:02 PM |
|
|
Thread: LinkedList by User Input
Post: LinkedList by User Input
Hello everyone, my name is Santiago **biggrin** .
I have to write a program that reads a sequence of numbers one by one and stores them in a LinkedList.
This program must meet certain conditions:
... |
|
SantiagoPB |
General Coding Help |
5 |
3,794 |
Mar-03-2021, 06:47 PM |
|
|
Thread: Need some help to fix my code
Post: RE: Need some help to fix my code
(Feb-28-2021, 03:27 PM)deanhystad Wrote: str.split() splits a string into a list of shorter strings. It does not convert the strings to numbers. Your code was sorting strings, and as a string, '-5... |
|
SantiagoPB |
General Coding Help |
6 |
3,570 |
Feb-28-2021, 06:31 PM |
|
|
Thread: I need some help with my code
Post: RE: I need some help with my code
Hello Serafin, I did it new (with empty list as you said now), but still having a problem with the Given list by user. I did a new post asking for this problem. I let you the link of my new post and c... |
|
SantiagoPB |
Homework |
5 |
3,240 |
Feb-28-2021, 02:14 PM |