Python Forum
Trouble with general code flow
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trouble with general code flow
#1
As you can see by my crude coding I am a newbie.  I've gotten this far and know my objectives could be achieved by much better coding (last file asked to be open fails).  The objective is to put together a program based on a book about Christian counseling principles where-by through series of questions and answers received an analysis is achieved.  I had planned upon getting the question and answer part put together to go back inserting code to capture response and based on such response insert data into a client file in order to form the final analysis.
Can anyone offer help as to better code and ideas to achieve my final goal.  Thank-you
redacted


#!/usr/bin/env python3.4
# -*- coding: utf-8 -*-
"""
Created on Fri May 19 23:55:18 2017

@author: nisbet
"""

#def main():
#    Info.txt = raw_input("Info.txt: ")
#    infile = open(Info.txt, 'r')
#    data = infile.read()
#    print ("data")
#next
...
...
name = input('What is your name? ')
print('Hello ' + name)

Age = input('What is your age? ')
print('Your age is ' + Age)

num = input('Give me a PH number? ')
print('Is this right: ' + str(num))
import time
time.sleep(10)
with open("/home/nisbet/Heart_of_Man/Info.txt", "rt") as in_file:
   Info = in_file.read()

print(Info)
import time
time.sleep(15)
import sys
import os
with open("/home/nisbet/Heart_of_Man/forword.txt", "rt") as in_file:
   forword = in_file.read()
print(forword)
next
eval(input('Enter question number 1 through 10:'))
with open("/home/nisbet/Heart_of_Man/Question1.txt", "rt") as in_file:
       Question1 = in_file.read()
       if input == 1:
           Question1 = 1      
print(Question1)
import time
time.sleep(60)
next
eval(input('Does A B or C best discribe '))
print(name)
with open("/home/nisbet/Heart_of_Man/QuestionA.txt", "rt") as in_file:
       QuestionA = in_file.read()
       if input == A:
           QuestionA = A      
print(QuestionA)
Reply


Messages In This Thread
Trouble with general code flow - by JCN - May-26-2017, 03:31 AM
RE: Trouble with general code flow - by sparkz_alot - May-26-2017, 01:27 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Alicat Flow Meter data acquisition marenr 0 909 Sep-29-2023, 10:59 PM
Last Post: marenr
  Node Flow Generation in Python Linenloid 0 1,116 Feb-21-2023, 07:09 PM
Last Post: Linenloid
  Flow Control Help RoadToSensei 5 2,720 Feb-14-2022, 08:21 PM
Last Post: deanhystad
  Understanding Raspberry PI RTS/CTS flow control zazas321 2 4,711 Oct-30-2020, 09:55 AM
Last Post: zazas321
  Understanding Raspberry PI RTS/CTS flow control zazas321 0 2,016 Oct-30-2020, 08:02 AM
Last Post: zazas321
  Reproducing assignment with min cost flow in networkx mntfr 0 2,603 Jun-13-2019, 04:06 PM
Last Post: mntfr
  Find Maximum Flow for graph with infinite capacities Dav 6 5,678 Apr-16-2019, 02:08 PM
Last Post: Dav
  Trouble Understanding Why This Code Works crocolicious 2 3,448 Apr-09-2019, 05:24 PM
Last Post: crocolicious
  Python with email forms, and frontend code in general MattH 4 4,324 Feb-18-2018, 03:29 AM
Last Post: MattH
  program flow advice sampazzer 2 3,812 Aug-05-2017, 09:34 PM
Last Post: sampazzer

Forum Jump:

User Panel Messages

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