100 Days of Code: The Complete Python Pro Bootcamp for 2022 - Day 1 (Band Name Generator)

mikekameta

mikekameta

Posted on April 2, 2023

100 Days of Code: The Complete Python Pro Bootcamp for 2022 - Day 1 (Band Name Generator)

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')") 
Enter fullscreen mode Exit fullscreen mode

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.")
Enter fullscreen mode Exit fullscreen mode

Exercise 3 - Input Function

#Write your code below this line πŸ‘‡
print(len(input("What is your name?")))
Enter fullscreen mode Exit fullscreen mode

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)
Enter fullscreen mode Exit fullscreen mode

Project 1 - Band name generator

#1. Create a greeting for your program.
print("Welcome to the Band Name Generator \n")
#2. Ask the user for the city that they grew up in.
city = input("Whats the name of the city where you grew up? \n ")
#3. Ask the user for the name of a pet.
pet_name = input("Name of pet? \n ")
#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
Enter fullscreen mode Exit fullscreen mode
πŸ’– πŸ’ͺ πŸ™… 🚩
mikekameta
mikekameta

Posted on April 2, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related