Python Forum
the uncompleteness of the text string
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
the uncompleteness of the text string
#1
Confused
Hello everyone.
I downloaded Python a few hours ago and, to start programming, I also downloaded PyCharm Community Edition 2019. Once I entered I learned to write basic things like: -print -create a calculator -have user input etc. I tried to create a text containing many of these things but once I exit PyCharm and launch the text string with Python the last part of it does not appear on the screen and disappears immediately. Can I know how not to make the program disappear once I have finished writing? I am attaching two recordings: one of the prject runned in PyCharm while the second is the project runned on Python: can someone help me understand why if i use the Python project at a certain point the program crashes and do not end the string of text? I am also carrying the string of text that i wrote... maybe that is the problem!



from math import *
print(" Benvenuto in MC\nCon questo programma puoi svolgere diverse funzioni!\nPer esempio: ")
name = input("Inserisci il tuo nome: ")
print("Il piacere è tutto mio " + name)
print("Prima di poseguire è necessario specificare la propria età: ")
age = input("Inserici di seguito la tua età: ")
print("Perfetto! " + name + "Ora possiamo proseguire")
print("Dato che hai " + age + " saprai sicuramente fare le addizioni e le sottrazioni")
num1 =input("Inserisci un numero: ")
num2 =input("Inserisci un numero che vuoi sommare al primo: ")
risul = float(num1) + float(num2)
print(risul)
print("Come puoi notare non sbaglio mai!")
print("Un'altra cosa che posso fare è creare una fiaba solo per te: ")
title =input("Inserisci il titolo della tua fiaba: ")
prot =input("Inserisci il nome del protagonista della tua fiaba: ")
ant =input("Inserisci il nome dell'antagonisata della tua fiaba: ")
gun =input("Inserisci il nome di un oggetto: ")
author =input("Inserisci il nome dell'autore della fiaba: ")
print("Grazie " + name + " per aver inserito le informazioni; aspetta un minuto\nStiamo processando la tua fiaba")
print("1% completato")
print("50% completato")
print("99% completato")
inf =input(" Sei sicuro di voler processare la tua fiaba " + name + " ?")
print(" Eccoti allora " + title + " scritta da " + author + " !")
print("Signore e signori vi presentiamo " + title + " una fiaba di " + author)
print("C'era una volta " + prot + " che camminava da sola nel bosco")
print("Ad un certo punto " + prot + " incontra " + ant)
print(prot + " tira fuori " + gun + " e massacra "  + ant)
print("Queste sono solo alcune delle funzioni che posso svolgere " + name)
print("E' stato bello conoscerti...\nMagari ci rivediamo quando avrai più di " + age + " anni!\nCosì ti mostrerò moltissime nuove funzioni!")
print(" Premi invio se hai terminato")
Reply
#2
Hello Cava, that is a nice program you wrote. I am trying to learn Italian so I enjoyed it. I am not sure I understand what your problem is. You say the program crashes. It does not with me. I think it vanishes from your screen because it is just finished. Try to change the last line to:
input(" Premi invio se hai terminato")
Is that what you mean?
Reply
#3
(Feb-21-2020, 10:02 AM)ibreeden Wrote: input(" Premi invio se hai terminato"
Thank you so much now i have learnt why it was going away! thank u so much!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Sad How to split a String from Text Input into 40 char chunks? lastyle 7 1,122 Aug-01-2023, 09:36 AM
Last Post: Pedroski55
  Editing text between two string from different lines Paqqno 1 1,310 Apr-06-2022, 10:34 PM
Last Post: BashBedlam
  Extract a string between 2 words from a text file OscarBoots 2 1,864 Nov-02-2021, 08:50 AM
Last Post: ibreeden
  Replace String in multiple text-files [SOLVED] AlphaInc 5 8,079 Aug-08-2021, 04:59 PM
Last Post: Axel_Erfurt
  fuzzywuzzy search string in text file marfer 9 4,517 Aug-03-2021, 02:41 AM
Last Post: deanhystad
Question How to extract multiple text from a string? chatguy 2 2,347 Feb-28-2021, 07:39 AM
Last Post: bowlofred
  can't save text string branko316 2 1,952 May-31-2020, 02:46 PM
Last Post: branko316
  Highlight and remove specific string of text itsalmade 5 3,503 Dec-11-2019, 11:58 PM
Last Post: micseydel
  Converting a patterned string or text into excel table soup1987 1 2,121 Oct-03-2019, 01:37 AM
Last Post: Larz60+
  write image into string format into text file venkat18 2 4,386 Jun-01-2019, 06:46 AM
Last Post: venkat18

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020