If you have any questions, comments or issues with this project please post them here!
How do create an application?
What do you mean be application?
An app that would run on Android
im typing my code in correctly and its not printing the code in the console its only printing the first line
The code is working fine. The line after an input statement wont run until something was inputed
Let’s get to know
I just built my first interactive code which takes inputs from the user! Day 2 of
https://replit.com/@JackAdem/Day-002-Project-2-Getting-to-Know-You-Project?v=1
#Replit100DaysOfCode #100DaysOfCode.
you need to enter your age in console > , and press enter. however it will not display anything because the input is just storing what you type in the console and storing it in the “MyAge” variable. After pressing enter your next question will be displayed in the console, in this case: the second question that will be displayed is “your name?”
when u use the function input() the program wait the user insert something in the console and press enter.
if u wanna see your age and name stored in the variables “MyAge” and “MyName” you need to use the function print() and call the variables for example:
print(MyAge)
Here is how I coded it:
yourName = input("What is your name? ")
yourFood = input("What is your favorite food? ")
yourMusic = input("What is your favorite music? ")
yourHome = input("Where do you live? ")
print()
print("Your name is " + yourName + “.”)
print("Your favorite food is " + yourFood + “.”)
print("Your favorite music is " + yourMusic + “.”)
print("You live in " + yourHome + “.”)
print()
print(“Thank you for answering these questions!”)
Here is the output:
What is your name? John
What is your favorite food? Chocolate
What is your favorite music? Rock
Where do you live? Mississippi
Your name is John.
Your favorite food is Chocolate.
Your favorite music is Rock.
You live in Mississippi.
Thank you for answering these questions!
Thanks @millerfilm I wanted to share with you a tip on how to format your code in Replit Ask.
If you enter three backtick characters before and after the code it will change this:
print(“Hello there my name is IanAtReplit.”)
print()
print(“What is your name?”)
into
print("Hello there my name is IanAtReplit.")
print()
print("What is your name?")
Hope this helps!
Ah! Very nice. Thank you. I will try to get acquainted with how the board works.
Once again this is truly just a note really for myself to keep me going for 100 days but let’s start it out. Day 2- I still am learning a few things that I never knew about some of the input statements. Probably didn’t know because I’m stupid, but you can use the “” in the input statement. I am really enjoying these 100 days of code and it’s bringing me back to the start. I get to relook at some things I never thought I would have someone teach me to do again. Like doing print statements. It’s just going from strait rock bottom and building you up with more knowledge that you might not have known previously about some simple things.
Replit- https://replit.com/@Chandler0Bing/100-Days-Of-Code-Day-2
Already complete!
I used a trick called adding strings.
code:
name = input("What is your name? ")
food = input("What is your favorite food? ")
music = input("What is your favorite music? ")
location = input ("Where do you live? ")
print ("Your name is "+name+" and you like to eat "+food+ " and your favorite music is "+music+".")
print("glad to know you :) ")
Example output:
ill pause right now.
It’s actually concatenating strings.