Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

add a simple form piece of code to help in the data collection #356

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions Python3-Learn/basic_form.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// AUTHOR: Johan R
// Python3 Concept: use python to ask info for a from
// GITHUB: https://github.com/joaramirezra

//Add your python3 concept below

# first collect information
# made a hello world program


#add an input to save de name
name = input("What is your name? ")
# add the year of birth and calculate the age
year_of_birth = int(input("What year were you born? "))
age = 2021 - year_of_birth
# bolean ask if the user likes the program
likes = input("Do you like this program? ")
# print the result
print(f"Hello {name}, you are {age} years old and {likes} this program.")
if likes == "yes":
#print the result
print("I like this program too!")
else:
#print the result
print("I don't like this program!")