Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

some program in python #4

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
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# python-codes

add your python codes here
hi everyones this repo aims to helps all the beginners of python to learn the basics of python. to achieve
that you can add your python files in this repo and then you can share it with your friends and they can read and add more if they want.



43 changes: 43 additions & 0 deletions do_you_need_to_program.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# this program is to check if you need to program or not

# ask user for input name ann language of programming
name = input("What is your name? ")
language = input("What is your favorite programming language? ")

# print out the name and language
print("Hello " + name + ", I see you like " + language + ".")
# ask if the user has to program or not (y/n)
program = input("Do you need to program? (y/n) ")
# if the user has to program
if program == "y":
# print out the message
print("I see you need to program.")
# tell the user a motivational message
print("I see you need to program. You should try to learn how to program.")
# if the user does not have to program
else:
# print out the message
print("I see you do not need to program.")
# ask if they have to program in the future (y/n)
future = input("Do you need to program in the future? (y/n) ")
# if the user has to program in the future
if future == "y":
# print then program now
print("You should program now.")
# if the user does not have to program in the future
else:
# print out the message
# ask the user if they have some code to improve
improve = input("Do you have some code to improve? (y/n) ")
# if the user has some code to improve
if improve == "y":
# print out the message"
# print you should program now
print("You should program now.")
# if the user does not have some code to improve
else:
# print out the message you should program later so program now
print("You should program later.")