An Interest In:
Web News this Week
- April 27, 2024
- April 26, 2024
- April 25, 2024
- April 24, 2024
- April 23, 2024
- April 22, 2024
- April 21, 2024
April 2, 2022 04:18 am GMT
Original Link: https://dev.to/mike_kameta_aed62d48c2d0f/100-days-of-code-the-complete-python-pro-bootcamp-for-2022-day-1-2bhk
100 Days of Code: The Complete Python Pro Bootcamp for 2022 - Day 1
Exercise 1 - Printing
Write your code below this line
print("Day 1 - Python Print Function")
print("The function is declared like this:")
print("print('what to print')")
Exercise 2 - Debugging Practice
Fix the code below
print("Day 1 - String Manipulation")
print('String Concatenation is done with the "+" sign.')
print('e.g. print("Hello " + "world")')
print("New lines can be created with a backslash and n.")
Exercise 3 - Input Function
Write your code below this line
print(len(input("What is your name?")))
Exercise 4 - Variables
Don't change the code below
a = input("a: ")
b = input("b: ")
Don't change the code above
Write your code below this line
a,b = b,a
Write your code above this line
Don't change the code below
print("a: " + a)
print("b: " + b)
Project 1 - Band name generator
1. Create a greeting for your program.
print("Welcome to the Band Name Generator
")
2. Ask the user for the city that they grew up in.
city = input("Whats the name of the city where you grew up?
")
3. Ask the user for the name of a pet.
pet_name = input("Name of pet?
")
4. Combine the name of their city and pet and show them their band name.
print("Your band name could be " + city + " " + pet_name)
5. Make sure the input cursor shows on a new line, see the example at:
https://replit.com/@appbrewery/band-name-generator-end**_
Original Link: https://dev.to/mike_kameta_aed62d48c2d0f/100-days-of-code-the-complete-python-pro-bootcamp-for-2022-day-1-2bhk
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To