How to use filename_prompt method in refurb

Best Python code snippet using refurb_python

question1.py

Source: question1.py Github

copy

Full Screen

1'''A program that simulates a simple BBS2Sanele Mdlalose313-04-20144Assignment5,Question1'''56def menu():7 print("Welcome to UCT BBS")8 print("MENU")9 print("(E)nter a message")10 print("(V)iew message")11 print("(L)ist files")12 print("(D)isplay file")13 print("e(X)it")1415mssg="no message yet"16while mssg: 17 menu()18 main_prompt=input("Enter your selection:\n")19 if main_prompt=="E" or main_prompt=="e":20 mssg_prompt=input("Enter the message:\n")21 mssg=mssg_prompt22 continue23 24 elif main_prompt=="V" or main_prompt=="v":25 print("The message is:",mssg)26 27 28 elif main_prompt=="L" or main_prompt=="l":29 print("List of files: 42.txt, 1015.txt")30 31 elif main_prompt=="D" or main_prompt=="d":32 filename_prompt=input("Enter the filename:\n")33 if filename_prompt=="42.txt":34 print("The meaning of life is blah blah blah ...")35 36 elif filename_prompt=="1015.txt":37 print("Computer Science class notes ... simplified")38 print("Do all work")39 print("Pass course")40 print("Be happy")41 42 else:43 print("File not found")44 45 elif main_prompt=="X" or main_prompt=="x":46 print("Goodbye!")47 break48 ...

Full Screen

Full Screen

main.py

Source: main.py Github

copy

Full Screen

1from charts import create_chart2from data_storage import read_column3user_menu = """Please choose from the following options:4- Enter 'c' to chart a new graph.5- Enter 'q' to quit.6Your selection: """7charting_menu = "Enter the column you'd like to chart: "8filename_prompt = "Enter your desired file name: "9def handle_chart():10 column = int(input(charting_menu))11 x = read_column(-1)12 y = [float(n) for n in read_column(column)]13 filename = input(filename_prompt)14 create_chart(x, y, filename.strip())15while True:16 user_selection = input(user_menu)17 if user_selection == "q":18 break19 elif user_selection == "c":20 handle_chart()21 else:...

Full Screen

Full Screen

Blogs

Check out the latest blogs from LambdaTest on this topic:

Test strategy and how to communicate it

I routinely come across test strategy documents when working with customers. They are lengthy—100 pages or more—and packed with monotonous text that is routinely reused from one project to another. Yawn once more— the test halt and resume circumstances, the defect management procedure, entrance and exit criteria, unnecessary generic risks, and in fact, one often-used model replicates the requirements of textbook testing, from stress to systems integration.

Rebuild Confidence in Your Test Automation

These days, development teams depend heavily on feedback from automated tests to evaluate the quality of the system they are working on.

Developers and Bugs – why are they happening again and again?

Entering the world of testers, one question started to formulate in my mind: “what is the reason that bugs happen?”.

Six Agile Team Behaviors to Consider

Are members of agile teams different from members of other teams? Both yes and no. Yes, because some of the behaviors we observe in agile teams are more distinct than in non-agile teams. And no, because we are talking about individuals!

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run refurb automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful