Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Learning Python With Projects (Mad libs)

Syntax - Comments, Prints, Variables, Strings, Integers, String Concatenations, and Inputs.

https://youtu.be/WChJ8aBjw7A

Tutorial


test1.py file

  1. comments - For python, used with a '#' symbol or 3 quotes nesting your comment:
  • helps explain what the code is doing

  • great for jogging your memory if you are editing old code

  • helps keep code organized

  1. prints - A function Used to send data to the console/terminal/screen:
  • Keep track of data in any part of your code
  • Great for debugging code
  • Needed for terminal/CLI based programs
print('ThisGuyCodez....*')
print(24)

FROM NOW ON WE WILL USE PRINT TO DISPLAY OUR VALUES TO THE CONSOLE AND COMMENTS TO BE ORGANIZED

  1. Strings, Integers , Floats , and Booleans - Data Types:
  • 3a.) String{a sequence of characters within quotes} ...I will print this out below
# printing 2 exmaples of a String
print('This is a String' , "I'm a string 2")
  • 3b.) Integer{regular number} solid numbers only(NO COMMAS)...I will print this out below
# printing 2 exmaples of an Integer
print(24 or 2400)
  • 3c.) Float{decimals}...I will print this out below
# printing 2 exmaples of a Float
print(5.1 or 33.33)
  • 3d.) Boolean{One of the two values - True or False}...I will print this out below
# printing exmaples of a Boolean
print(True or False)

  1. Try writing the syntax yourself in the test1.py file:
# Try it your self......
# Answer all the questions below, then move on to test2.py






# Try it your self......
# Answer all the questions below, then move on to test2.py



# 1.) print my youtube channel as a string...



'''
 2.) print the names of your favorite 
coding languages you know or the names 
of the ones you want to learn in a string...
''' 




# 3.) print a random number/integer...



# 4.) print a random decimal...



# 5.) print a bool...



# 6.) print a string, integer, decimal, and a bool...

test2.py file

  1. Variables - A place to store values for your code to manipulate, for the computer to process, etc.:
you_tube = 'ThisGuyCodez'

print('here is a variable ---->',you_tube) 
  1. String concatenation - more than one strings added together[Using the 'Format method']:
name = 'Guy'
you_tube = 'ThisGuyCodez'
lang = 'Python'

concat = f"{name} talks about {lang} on his YT channel '{you_tube}'"
# -- OR --
concat = "{} talks about {} on his YT channel '{}'".format(name,lang,you_tube)
			
print(concat)
  1. Inputs - Function used to get data from the user:
"""
Prompt the user by typing in 
the question the user should see
within the parentheses of the function as a string...
"""

input("Whats Your Name? ")	

"""		
-On the interacting side of things 
(in this case the console/terminal)
you would be able to actually type in your name..

>>> Whats Your Name? Guy

Even so, since we did not save it to a "Variable", there is
nothing we can do with it. Try what we went over so far yourself below
and remember to save your inputs into variables.
"""

Mad Libs Project - Follow and apply each step.

# 1.)get the users name, favorite number, adv, and verb




# 2.) concat the inputs together in a sentence



# 3.) print your concat string

CONGRATS YOU JUST PROGRAMMED YOUR A MAD LIBS GAME IN PYTHON


SEE HOW FAR YOU CAN GO AN SHARE IN THE COMMENTS

Thanks For Reading

About

Basic MadLibs word game written in python. Added extra python files for begginers to follow(test1.py, test2.py)

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages