How to make an application! (SO EASY)!
What's up, guys! I'm back, DSAJagat, aka cyan from amongus. In this post, I'll be showing you how to make an application! these steps are so easy, that the minimum amount of code is about 10 lines, and we don't need to import anything! Also, If I do something wrong, pls let me know. and also bare with me, this is my first time posting anything.
Let's do this!
open up a new repl, and the very first line of code is
Application = 'write what the application is about in these quotations'
depending on your application style, we may or may not need this line of code. but let's slip it in just incase.
Now, let's move on. I don't have all day, and I bet you don't either. on line two, let's give our user a warm welcome!
print("Hello there! today, you will be filling out an application about"+ Application +"!")
This tells the users what the heck they are going to do. It also says hi. Now our third line will include the first question!
Yes, Your eyes are right. I just made a whole new header about adding questions. Now before you call me an organizing geek, I had to make a new header just for questions, because there is A LOT more to it than you expect. nevertheless, it will still be easy.
So, there are two different types of questions which you will need to know to code a successful application. the first type of question is one where there is no certain answer. for example, your name. if I ask you what is your name, and you tell me your name, I would be total bonkers to say, "nope, that's wrong". Your name is YOUR NAME!
Then, we have questions where there is a certain answer. For example, what is 1+1. if you say, 5, I can say that your answer is wrong, since 1+1 has a certain answer. Honestly, I don't know why you would be coding if you didn't know 1+1, but It's 2.
Let's code questions!
Okay! now we know the two types of questions, we can code them. I can't believe that we are STILL on line 3, but hey- we have what we have. ANYWAY, on line three, we should start by asking the user's name!
input("What is your name?")
can you guess what kind of question that was? Yup, a no-certain-answer one. I have to abbreviate that somehow. okay, nca means no certain answer. kapish?
anyway, as shown above, for nca questions, we just make the computer input the question. the ca (certain answer) questions aren't as easy as nca questions!
speaking of which, we are about to make our first ca question!
make it something like this:
questiontwo = input("write question one here in these quotations!'")
so, You know that this question is a ca question. Welp, you're right! for ca questions, you should make a variable for your question. in my code above, questiontwo is my variable.
Now, some magic is about to happen. well, just something cool.
Now, type this:
if questiontwo == 'type the correct answer in these quotations!':
Done! That's the minimum amount of questions! Now, to say good bye to the user:
print("bye bye! Thank you for filling out the app")