Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Stampa a destra monty
-
Buongiorno sono non nuovo nuovissimo. Sono alle prese con primi capitoli di pensare con un pc e con primi esercizi...
il 3.1 dice di scrivere funzione con argomento s e allineare stringa monty a destra con ultimo carattere la y.
Io ho fatto questo:def stampaadestra(s): s='monty' print(s.rjust(65)) stampaadestra(1)
È giusto?
-
@cladocora è troppo semplice?
-
Is right or wrong the function above ? I'm new and I need help
-
@cladocora Hi, in this forum you should ask anything using english lang, italian is not good in an international forum like this one. E scusami l'osservazione ma non era molto chiara neanche la domanda in italiano.
For your problem I suggest you to see here.
Short version: in your post
- share your test script,
- write output of your Pythonista after execution of the script,
- write output you want if it is different from the one of point 2
Bye
-
@cladocora If I correctly understand you want to do this:
def stampaadestra(s): print(s.rjust(65)) stampaadestra('monty') stampaadestra('python')
In your code, s was a numeric parameter (1) and you destroyed it by a string ('monty ').