Sep-03-2018, 05:43 AM
Hello community,
I am just starting to code. I have watched all the basic tutorials and stuff, have no problems of finding specific error related questions and etc.
My question is rather simple:
I have a simple logic written with Python3 on PyCharm (which I am adding below post) and my goal is to create a webapp or something similiar, but basicly it should be reacheable via web.
It should contain simple styled window, with corresponding active buttons for answers, some pop ups and etc. When you will scan thru my code You will understand what I want.
So for this case, what should I do to make it happen? I mean, can you give me any advices where to start? I already watched sentdex youtube series about web development with django, and it is rather confusing for me, but I think it is possible.
Or I am looking for a totaly different stuff?
Thanks in advance.
CODE:
I am just starting to code. I have watched all the basic tutorials and stuff, have no problems of finding specific error related questions and etc.
My question is rather simple:
I have a simple logic written with Python3 on PyCharm (which I am adding below post) and my goal is to create a webapp or something similiar, but basicly it should be reacheable via web.
It should contain simple styled window, with corresponding active buttons for answers, some pop ups and etc. When you will scan thru my code You will understand what I want.
So for this case, what should I do to make it happen? I mean, can you give me any advices where to start? I already watched sentdex youtube series about web development with django, and it is rather confusing for me, but I think it is possible.
Or I am looking for a totaly different stuff?
Thanks in advance.
CODE:
import random print('This is the game of myths and facts') name = input('Speicify your name: ') myth = ['myth1','myht2', 'myht3','myht4' , 'myht5', 'myth6', 'myth 7'] fact = ['some facts 1','some facts 2', 'some facts 3','some facts 4', ' some facts 6 ', 'facts 7'] points = 0 gcount = 0 empty = [] print('Now we are going to ask you ' + name + ', some questions and state some statements') print('For a following answers you must type M or F') while gcount <= 3: rand_mf = random.choice(myth + fact) if rand_mf not in empty: empty.append(rand_mf) print(rand_mf) print('Myth or a fact??') guess = input('Select an answer') if rand_mf in myth and guess == ('M' or 'm'): points +=1 print('Correct it is a myth, you get a point, you have ' + str(points) + ' points') elif rand_mf in fact and guess == ('F' or 'f'): points +=1 print('Correct it is a fact, you get a point, you have ' + str(points) + ' points') elif guess == '': print('Please insert your answer') else: print('WROO000ONG') gcount +=1 elif points >= 10: break else: pass if gcount >= 3: print('You lost with ' + str(points) + ' number of points') elif points >= 10: print('You won with maximum 10 pts!') print('Done')