User input in Python is easy + exercises ⌨️

  Рет қаралды 101,014

Bro Code

Bro Code

Күн бұрын

Пікірлер: 230
@BroCodez
@BroCodez Жыл бұрын
# ------------------------------------------------ # EXERCISE 1 MAD LIBS # ------------------------------------------------ adjective1 = input("Enter an adjective: ") noun = input("Enter a noun: ") adjective2 = input("Enter an adjective: ") verb = input("Enter a verb: ") adjective3 = input("Enter an adjective: ") print(f"Today I went to a {adjective1} zoo.") print(f"In an exhibit, I saw {noun}.") print(f"{noun} was {adjective2} and {verb}ing.") print(f"I was {adjective3}!") # ------------------------------------------------ # EXERCISE 2 AREA CALC # ------------------------------------------------ length = float(input("Enter the length: ")) width = float(input("Enter the width: ")) #area = length * width #print(f"The area is: {area}cm^2") # ------------------------------------------------ # EXERCISE 3 SHOPPING CART # ------------------------------------------------ item = input("What item would you like to buy?: ") price = float(input("What is the price?: ")) quantity = int(input("How many would you like?: ")) total = price * quantity print(f"You have bought {quantity} x {item}/s") print(f"Your total is: ${round(total, 2)}")
@hydershahzaibahmed2539
@hydershahzaibahmed2539 Жыл бұрын
@@Love.Stefan What do you mean your disappointed, this is such an amazing series, what do you mean by that?
@ilyjesusable
@ilyjesusable 11 ай бұрын
Today I went to a beautiful coffee shop In a bathroom I saw grimes Grimes was green and filing for divorce-ing I was sus
@vanessa1707
@vanessa1707 3 ай бұрын
Thanks for making these tutorials fun. Here is mine inspired by a popular meme: noun1 = input("Enter a noun: ") noun2 = input("Enter a noun2: ") verb = input("Enter a verb: ") noun3 = input("Enter a noun3: ") adjective1 = input("Enter an adjective1: ") adjective2 = input("Enter an adjective: ") print(f"I went to the {noun1} show") print(f"In the show, {noun1} gave everyone a {noun2}") print(f"{noun1} was {verb}ing") print(f"You get a {noun3} and you get a {noun3}! I was {adjective1} and {adjective2}") and here are my results : Enter a noun: Oprah Enter a noun2: Gift Enter a verb: Screech Enter a noun3: Car Enter an adjective1: Shocked Enter an adjective2: Amazed I went to the Oprah show In the show, Oprah gave everyone a Gift Oprah was Screeching You get a Car and you get a Car! I was Shocked and Amazed Process finished with exit code 0😆
@whoiszaid9657
@whoiszaid9657 3 ай бұрын
I went to a bank that had {5000} in their lockers I went straight to the lobby where there were the {4} standing I went their for depositing my {3500} in my savings account I stood their for {3.0} Still no response my {'bad'} was not so good
@felinezero
@felinezero Жыл бұрын
Bro here teaching English too now 🤣 Love you Bro! 😸
@FamilyFriendly-z4s
@FamilyFriendly-z4s 3 ай бұрын
best bro u can get fr...
@user-jv9gh2xg2b
@user-jv9gh2xg2b Жыл бұрын
verb = input ("Enter a verb: ") noun • input("Enter a noun: ") adjective • input("Enter an adjective: ") noun2 • input("Enter another noun: ") print(f"Today I (verb} with a {noun} during a {adjective] football game") print(f"I enjoyed it just like I enjoyed my {noun2}. Output: Today I fishing with a tree during a hairy football game I enjoyed it just like I enjoyed my bed I screwed up my grammar, but thanks for your tutorials Bro Code!!
@SimpleAverageBoi69
@SimpleAverageBoi69 Жыл бұрын
😂😂😂
@VelixRoblox
@VelixRoblox Жыл бұрын
noun1 = input("Enter a noun: ") noun2 = input("Enter another noun: ") adjective = input("Enter an adjective: ") verb = input("Enter a verb: ") print(f"Once there lived a {noun1}.") print(f"While walking on the road, he/she saw a {adjective} {noun2},") print(f"but the {noun2} was not {adjective}, it {verb}ed on {noun1}") INPUT: Enter a noun: Velix Enter another noun: Hen Enter an adjective: beautiful Enter a verb: jump OUTPUT: Once there lived a Velix. While walking on the road, he/she saw a beautiful Hen, but the Hen was not beautiful, it jumped on Velix. Bro Code! I luv the series so much! It's easy to understand and I Luv it!
@joanneosborne2428
@joanneosborne2428 7 ай бұрын
I appreciate your training approach; it's clear, enjoyable, and straightforward. Thank you for keeping it simple and to the point.
@zubair1424
@zubair1424 24 күн бұрын
have you been able to learn python from these videos? wanted to check before I start.
@washingtonm654
@washingtonm654 2 күн бұрын
@@zubair1424 yh bro really helped me in my computer class .good videos from bro code
@Cyberbully34
@Cyberbully34 Жыл бұрын
"Mark Zuckerberg was berserk and screeching" bro 💀
@francisjacquart9618
@francisjacquart9618 Жыл бұрын
THANKS A LOT FOR THESE EXPLANATIONS AND EXERCISES...THEY ARE DEAD EASY TO UNDERSTAND AND I LOVE THE VIDEOS! LOVE AND TAKE CARE!
@OneBorko
@OneBorko Жыл бұрын
I love your voice
@nexus4dev
@nexus4dev Жыл бұрын
sussy
@SB-nr1to
@SB-nr1to 10 ай бұрын
Imposter
@passportbro904
@passportbro904 8 ай бұрын
Sus Ok
@Pgertse7
@Pgertse7 Жыл бұрын
Your video is much easier to understand, im learning python to automate things in excell it takes alot of work.
@stevechoatie249
@stevechoatie249 23 күн бұрын
I'm really enjoying your tutorials! Thank you so much!! As I was trying to follow along with some of the examples, I was coding in Pycharm. It occurred to me when watching you code, you apparently know a lot of shortcuts in Pycharm that I don't. I searched your videos to see if you had done one on using Pycharm but I didn't see one. Is there any chance you might do a video on using Pycharm effectively?
@zephyrgaming9798
@zephyrgaming9798 Жыл бұрын
Sir you never disappoint with your content
@晉晟
@晉晟 20 сағат бұрын
======================================== EXERCISE 2 AREA CALC ======================================== length, width, height = \ [float(x) for x in input("Enter the length, width and height of a rectangle: ").split()] volume = length * width * height print(f"The volume is: {volume:.3f}cm³") Intput: 5.6 7 8.09 Output: The volume is: 317.128cm³
@Wills-ig3ek
@Wills-ig3ek Жыл бұрын
This was probably the most vulnerable exercise you made. Anyways, on with the code. Person = input("Who do you want your person to be?: ") toy1 = input("Which toy does your person want to play with?: ") toy2 = input("Which toy does your person also want to play with?: ") print(f"Once upon a time, there was a boy named {Person}.") print(f"He liked to play with {toy1} and fiddle with {toy2}") print(f"All was going well for him, until..") Who do you want your person to be?: Ballsack Which toy does your person want to play with?: Water Bottles Which toy does your person also want to play with?: Call of Duty CD Once upon a time, there was a boy named Ballsack. He liked to play with Water Bottles and fiddle with Call of Duty CD All was going well for him, until..
@zubair1424
@zubair1424 24 күн бұрын
have you been able to learn python from these videos? wanted to check before I start.
@FamilyFriendly-z4s
@FamilyFriendly-z4s 3 ай бұрын
this is the one i did for the area exercise--> length=int(input("enter an length for rectanlgle:")) widht=int(input("enter an widht for rectanlgle:")) area = widht*length print(f"so the area of the rectangle is according to the measurements u have give is {area}") thanks for taking a look at this whoever you are 🥰hope u have great day!
@mugiwara_shank
@mugiwara_shank 29 күн бұрын
city= input("Enter a city name- ") adjective1 = input("Enter a adjective-") noun1 = input("Enter a noun-") noun2 = input("Enter a noun-") ajecttive2 = input("Enter a adjective-") print(f"Today I went to a {city} park") print(f"The park was {adjective1}") print(f"Then I saw a {noun1} playing with {noun2}") print(f"Then I also join {noun1} and start playing with their {noun2}") print(f"it was {ajecttive2} to play with their {noun2}")
@user-lx7xd1hc4i
@user-lx7xd1hc4i 2 ай бұрын
#2.AREA CALCULATOR length = int(input("Enter the length of a rectangle: ")) width = int(input("Enter the width of a rectangle: ")) height = int(input("Enter the height of a rectangle: ")) area = length * width volume = length * width * height print(f"Area of rectangle is {area}cm^2") print(f"Volume of rectangle is {volume}cm^3") Output: Enter the length of a rectangle: 5 Enter the width of a rectangle: 8 Enter the height of a rectangle: 7 Area of rectangle is 40cm^2 Volume of rectangle is 280cm^3
@Kingheart5
@Kingheart5 8 ай бұрын
Mad Libs Game exercise adjective1 = str(input("Please enter an adjective")) noun = str(input("Please enter a noun ")) verb = str(input("Please enter a verb ")) adverb = str(input("Please enter an adverb ")) emotion = str(input("Please enter an emotion ")) print(f"Yesterday I went to a {adjective1} city") print(f"There was a {noun}") print(f"The {noun} was {verb} {adverb}") print(f"I was very {emotion}") Please enter a noun Lion Please enter a verb Running Please enter an adverb Aggressively Please enter an emotion Scared Yesterday I went to a Confusing city There was a Lion The Lion was Running Aggressively I was very Scared Thanks for the tutorial!
@Guttaaaz
@Guttaaaz 5 ай бұрын
1Mad Libs noun1 = input("Enter a noun: ") noun2 = input("Enter a noun: ") verb = input("Enter a verb: ") adjective = input("Enter an adjective: ") print(f"Today I went to {noun1}") print(f"I met {noun2}") print(f"I was {verb}ing with {noun2} there") print(f"It was a {adjective} day")
@bumbelul
@bumbelul 7 күн бұрын
that's awesome man. crazy fun . the only thing that i hate is the fact that as a non english speaker i tend to confuse the variables and it pisses me off. anytime you say something like "ahhh we'll just add int or float " i'm going crazy trying to remember which one was which and what does it actually mean 🤣🤣🤣 btw first day in this thing. i wanted to peak a bit to see what's this all about, i ended up watching your videos and trying stuff for the past 3 hours. you're an amazing teacher :D
@AlymbekUrozmatov
@AlymbekUrozmatov 4 ай бұрын
adjective1 = input ("Enter an adjective1 ") noun = input ("Enter a noun ") adjective2 = input ("Enter an adjective2 ") adjective3 = input ("Enter an adjective3 ") verb = input ("Enter a verb ") print(f"Today I went to {adjective1} school .") print(f"At the entrance, I saw {noun}.") print(f"{noun} was {adjective2} and {verb}ing.") print(f"I was {adjective3}!")
@paradoxine6287
@paradoxine6287 Жыл бұрын
I improvised this shopping cart with the if and else statement. item = input("Enter the product you want to purchase:") price = float(input("Enter the price of the said product:")) quantity = int(input("Enter the number of products you wish to purchase:")) total = price * quantity print(f"You are about to purchase {quantity} x{item}/s.") print(f"Thereby, your total is {total} pesos.") print("Continue to purchase? Type 'yes'") answer = input("Please type your answer:") yes = True if answer := yes: print(f"You have successfully purchased {quantity} {item}/s. Thank you for your patronage at Yo Mama's store!") else: print("Purchase cancelled.") Thanks!
@Poem_AI
@Poem_AI Жыл бұрын
adjective1 = input("Inter Adjective1: ") noun = input("Enter a noun: ") adjective2 = input("Enter adjective2: ") verb = input("Enter a verb: ") adverb = input("Inter Adverbs: ") print(f"Yesterday I went to a {adjective1} Zoo") print(f"Inside the Zoo I saw a {noun}") print(f"The {noun} was verry {adjective2}") print(f"and it was {verb}ing") print(f"I was looking at it {adverb}") output Yesterday I went to a Giant Zoo Inside the Zoo I saw a Walia The Walia was very Small and it was Grazing I was looking at it amazingly
@zubair1424
@zubair1424 24 күн бұрын
have you been able to learn python from these videos? wanted to check before I start.
@vihanga_induwara__00
@vihanga_induwara__00 7 ай бұрын
width = float(input("what is the width : ")) length = float(input("what is the width : ")) hegith = float(input("what is the hegith : ")) area = width * length volume = width * length * hegith print(f"rectangle area is a {area}cm^2") print(f"rectangle volume is a {volume}cm^3")
@sarangbhandari7095
@sarangbhandari7095 Ай бұрын
Code: adjective1 = input("Enter a adjective: ") noun = input("Enter a noun: ") adjective2 = input("Enter a adjective: ") verb = input("Enter a verb: ") adjective3 = input("Enter a adjective: ") print(f"Today i went to a {adjective1} mall.") print(f"In an place, I saw {noun} ") print(f"{noun} was {adjective2} and {verb}ing") print(f"I was {adjective3}") Output: Today i went to a Big mall. In an place, I saw Speed Speed was wild and jumping I was happy
@imperiodosgameplays321
@imperiodosgameplays321 10 ай бұрын
adjective1 = input('Enter an adjective: ') noun = input('Enter a noun: ') adjective2 = input('Enter a second adjective: ') verb = input('Enter a verb: ') adjective3 = input('Enter a third adjective: ') print(f"Yesterday I went to an {adjective1} house.") print(f"In a rom, I saw {noun}.") print(f"{noun} was {adjective2} and {verb}ing.") print(f"I was {adjective3}!") Results: Yesterday I went to an scary house. In a rom, I saw Jason. Jason was creepy and hunting. I was scared!
@frozenhound_9143
@frozenhound_9143 Жыл бұрын
Im not so good at python but i can handle it , thats why when he started to make ana area calculator i went full on to make a square , rectangle and triagle area calculator this is the code for anyone who wanna try it : #a calculator to measure the area of three shapes shape = input(" choose shape : square , rectangle , triangle: ") if shape == "square": sl = input(" insert side length ") aos = int(sl)*int(sl) #sl = side length #aos = area of square print(f"area of square is {aos}cm²") elif shape == "rectangle": l = input(" insert length ") w = input(" insert width ") aor = int(l)*int(w) #aor = area of rectangle #l = length , w= width print(f"area of rectangle is {aor}cm²") elif shape == "triangle": b = input(" insert base length " ) h = input(" insert hight length ") aot = float(0.5) * float(b) * float(h) print(f"area of triangle is {aot}cm²") #b = base , h = hight #aot = area of triangle else: print(" error,unidentified shape")
@niceballz243
@niceballz243 Жыл бұрын
I made a version were calculator calls you an idiot if you input letters. Title= "Turbo Calculator" print(Title.upper()) side1 = input("Enter Length: ") side2= input("Enter width: ") if bool(side1.isdigit()) == False or bool(side2.isdigit()) == False: print("Enter a number you idiot") elif bool(side1.isdigit()) == True and bool(side2.isdigit()) == True: area = int(side1) * int(side2) print(f"Rectangle area equals: {area}")
@sunny34504
@sunny34504 Жыл бұрын
input("Enter your name") obj = input("Enter your object") adjective = input("Enter your adjective") feel = input("Enter your feeling") print(f"{name} loves{obj}s a lot!") print(f"she lives a true Love story with {obj}s") print(f"{name} become so{adjective} when someone remmember her in {obj}") print(f"she is a{feel} girl") OUTPUT: Enter your name lala Enter your object burger Enter your adjective hungry Enter your feeling funny lala loves burgers a lot! she lives a true Love story with burgers lala become so hungry when someone remmember her in burger she is a funny girl😄😄
@nagayamini901
@nagayamini901 4 ай бұрын
adjective1=input("Enter and adjective :") noun=input("Enter a noun:") adjective2=input("Enter and adjective :") verb=input("Enter a verb:") adjective3=input("Enter and adjective :") print(f"Today I saw a {adjective1} insect.") print(f"In lunch , I had {noun}") print(f"{noun} was {adjective2} and {verb}ing") print(f"I was {adjective3}") Today I saw a huge insect. In lunch , I had potato fry potato fry was crispy and mouth watering I was happy item=input("What item would you like to buy?") price=float(input("what is the price?")) quantity=int(input("How many would you like?")) total = price * quantity print(f"You have bought {quantity} X {item}/s") print(f"Your total is:Rs.{round(total, 2)}")
@FM-fc6uk
@FM-fc6uk Жыл бұрын
INPUT -------------------------------------------------------------------- adjective1 = input('Enter an adjective: ') noun = input('Enter a noun: ') adjective2 = input('Enter an adjective: ') adjective3 = input('Enter an adjective: ') print(f'Today i learned how to type user input in python, it was {adjective1}.') print(f'now i am tasked to make a story from {noun} teachings.') print(f'{noun} teachings was {adjective2}') print(f'I learned alot today i was so {adjective3}.') OUTPUT -------------------------------------------------------------------- Enter an adjective: cool asf Enter a noun: Bro Codes Enter an adjective: clear Enter an adjective: happy Today i learned how to type user input in python, it was cool asf. now i am tasked to make a story from Bro Codes teachings. Bro Codes teachings was clear I learned alot today i was so happy.
@Momo-iq6uu
@Momo-iq6uu 14 күн бұрын
I was about to go to the grocery store, this shopping program might come in handy!
@mateo1481
@mateo1481 Жыл бұрын
I'm so grateful with you, thanks or these lessons man! By other side i want to check if im understanding: the reason why the rectangle exercise throws error in the first try is because the user data is str and we need to cast it into float/int?
@loleder
@loleder Жыл бұрын
That's right!
@ovskihouse5270
@ovskihouse5270 Жыл бұрын
Thanks alot that's important for me to begin With
@الغابر00
@الغابر00 3 ай бұрын
adjective = input("Enter an adjictive: ") noun = input("Eenter a noun: ") adjective2 = input("enter an adjctive: ") verb = input("enter a verb: ") adjective3 = input("Enter an adjictive: ") print(f"in a dark night i was walking alone and it was{adjective} night") print(f"in a melancholy, i saw {noun}") print(f"{noun} was {adjective2} and {verb}ing") print(f"i was {adjective3}")
@user-kd3el1qn1w
@user-kd3el1qn1w 11 ай бұрын
adjective = input("enter an adjective: ") noun = input("enter a noun: ") noun = input("enter a noun: ") adjective = input("enter an adjective: ") verb = input("enter a verb: ") adjective = input("enter an adjective: ") print (f"at my college our principle showed us {adjective} audition" ) print (f"at audition we all met {noun}") print (f" {noun}'s music were {adjective} and {verb}") print (f"by looking at him we were {adjective}")
@kushalchakraborty9423
@kushalchakraborty9423 3 ай бұрын
item =input("the name of item you want to buy? ") price =float(input("price of the item you want to buy? ")) quantity =int(input("how many item you want to buy? ")) total = price * quantity print(f"the total payable amount for buying {quantity} {item} is {total},rupess ")
@Vertig_Pro
@Vertig_Pro Ай бұрын
item = input("What would you like to buy?: ") price = float(input("How much is it?: ")) quantity = int(input("How many would you like to buy?: ")) total = price * quantity print("----------------------------------------------------") print(f"For {quantity} {item}'s each costing {price} each") print(f"Your Total: ${total:.2f}")
@Guttaaaz
@Guttaaaz 5 ай бұрын
2Cal Area width = float(input("Enter the width of a rectangle: ")) height = float(input("Enter the height of a rectangle: ")) length = float(input("Enter the length of a rectangle: ")) area = width * height valume = length * width * height print(f"Area of the rectangle is {area} cm^2") print(f"Valume of the rectangle is {valume} cm^3")
@AryanSingh-tw4qo
@AryanSingh-tw4qo Ай бұрын
adjective = input("enter an adjective: ") noun = input("enter a noun: ") adjective2 = input("enter an adjective: ") verb = input("enter an verb: ") adjective3 = input("enter an adjective: ") print(f"today i went to an {adjective} zoo.") print(f"in an exhibit i saw {noun}") print(f"{noun} was {adjective2} and {verb}ing") print(f"i was {adjective3}")
@nightlessgamer
@nightlessgamer 8 ай бұрын
adjective = input("Enter an adjective: ") noun = input("Enter a noun: ") verb = input("Enter a verb: ") print(f"i was drinking a {adjective} coffee") print(f"last year i visited {noun}") print(f"{noun} was such a great place to {verb}") i was drinking a cold coffee last year i visited japan japan was such a great place to sleep
@iskandardz
@iskandardz 5 ай бұрын
adj1=input("enter adj:") noun1=input('enter noun1:') noun2=input("enter noun2:") adj2=input('ener2nd adj:') print(f"today i went to the a {adj1} place") print(f"i meet my frind{noun1} ") print(f'{noun2} was screaming') print(f'i was {adj2}')
@mohandakliamara
@mohandakliamara Ай бұрын
print(" You're a LEGEND bro ⚡! ")
@netkid5460
@netkid5460 8 ай бұрын
Now i misunderstood how madlibs worked and did this code before watching your video solution but here we go! username = input("Hello traveler, tell me your name: ") print(f"So {username}, you decided to to come to this...") adj1 = input("give me an adjective describing this day: ") print(f"yes! you came on this {adj1} day to meet.. who again?") enemy1 = input("name of your enemy: ") enemyage = int(input("enemies age: ")) userage = int(input("your age: ")) print(f"thats right! {enemy1} !") if (enemyage > userage): print(f"they are {enemyage - userage} years older than you") else: print(f"they are {userage - enemyage} years younger than you!")
@user-sh1zg3ox9t
@user-sh1zg3ox9t 9 ай бұрын
adjective1 = input("Enter a adjective: ") noun = input("Enter a noun: ") adjective2 = input("Enter a adjective: ") verb = input("Enter a verb: ") adjective3 = input("Enter a adjective: ") print(f"Today i went to a {adjective1} walmart.") print(f"I went to the restroom and saw {noun}.") print(f"the {noun} was {adjective2} and it was {verb}ing.") print(f"I was {adjective3}")
@idk_heitor
@idk_heitor 4 ай бұрын
adjective1 = input("Enter a adjective: ") professions = input("Enter a profission: ") noun = input("Enter a noun: ") verb = input("Enter a verb: ") object1 = input("Enter a object: ") object2 = input("Enter a another object: ") feeling = input("Enter a feeling: ") print(f"Today i went a {adjective1} a {professions}'s school. In there i saw {noun} {verb}ing with a {object1} and a {object2}. That was {feeling}. ")
@elma4980
@elma4980 7 ай бұрын
This is what I put :D temp = input("Enter a word for hot weather:") cold_item = input("Enter Cold thing: ") name = input("Put some random name: ") number = input("Amount you want: ") number = float(number) print(f"Hello It's a {temp} day today") print(f"I hope my {cold_item} doesn't melt") print(f"Its for {name}") print(f"I bought {number} {cold_item} for everyone")
@jhassee
@jhassee Жыл бұрын
#accepting user input noun = input("Please enter a noun: ") adjective = input("Please enter an adjective: ") verb = input(f"Please enter a verb: ") print(f""" Today I went to a {noun}, I saw a {adjective}, horse, he was {verb} fast! """)
@salvagelife308
@salvagelife308 2 ай бұрын
You make Python easy. Love you Bro haha
@ishruqahmed295
@ishruqahmed295 5 ай бұрын
noun = input("enter a noun: ") verb1 = input("enter a verb: ") verb2 = input("enter verb2: ") verb3 = input("enter verb3: ") verb4 = input("enter verb4: ") adjective = input("enter an adjective: ") print(f'today i went to a {noun}.') print(f"in there, I {verb1} many rides. ") print(f"I also {verb2} and {verb3} a ice cream.") print(f"I {verb4} a lot of {adjective}.") enter a noun: park enter a verb: rode enter verb2: bought enter verb3: ate enter verb4: had enter an adjective: fun today i went to a park. in there, I rode many rides. I also bought and ate a ice cream. I had a lot of fun.
@dawafflegangster
@dawafflegangster Ай бұрын
Today I am learning coding from the dopest bro. While watching youtube I saw, st.louis st.louis was running and pooping I was thirsty
@SirStupidTheThird
@SirStupidTheThird 8 ай бұрын
adjective = input("Enter an adjective: ") food = input("Enter a kind of food: ") persontype = input("Enter a kind of relationship you have with a person: ") name = input("Enter a name: ") topping = input("Enter a topping you would put on food: ") decide = input("Enter 'to' or 'not to': ") adjective2 = input("Enter another adjective: ") print (f"Today I ate some {adjective} {food}") print (f"My {persontype}, {name}, made it for me") print (f"I put some {topping} on it") print (f"I decided {decide} ask for more due to how {adjective2} it was") output: Enter an adjective: terrible Enter a kind of food: bread Enter a kind of relationship you have with a person: enemy Enter a name: Blurbenstein Enter a topping you would put on food: mayonaise Enter 'to' or 'not to': not to Enter another adjective: monstrous Today I ate some terrible bread My enemy, Blurbenstein, made it for me I put some mayonnaise on it I decided not to ask for more due to how monstrous it was
@РичардПагава
@РичардПагава Жыл бұрын
lenght = float(input("whats lenght?: ")) width = float(input("whats width?: ")) heigh = float(input("heigh is?: ")) volume = lenght * width * heigh print(f"volume is {volume}cm")
@mohammadanas4340
@mohammadanas4340 4 ай бұрын
pizza_price = 4.99 coke_price = 2.99 juice_price = 3.0 item = input("What item would u like to buy?: ") if item == "pizza": total = pizza_price elif item == "coke": total = coke_price elif item == "juice": total = juice_price else: print("sorry we dont have that item") exit() quantity = float(input("How many would u like?: ")) total_cost = float(total) * quantity print(f"you have bought {quantity} {item}s") print(f"your total is: ${round(total_cost, 2)}") i did some changes on my own to practice some concept :)
@Wolf.life.13
@Wolf.life.13 5 ай бұрын
What item would you like to buy?: solana What is the price?: 184.65 How many would you like?: 50 You have bought 50 x solana/s Your total is: $9232.5
@AestheticBlue13
@AestheticBlue13 2 ай бұрын
adjective = input("Enter an adjective: ") noun = input("Enter a noun: ") verb1 = input("Enter a verb: ") verb2 = input("Enter a verb: ") verb3 = input("Enter a verb: ") print(f"Once there was a {adjective} {noun}.") print(f"The {adjective} {noun} was {verb1} with his eyes closed.") print(f"The {adjective} {noun} {verb2} a stone.") print(f"He {verb3} face-flat on the ground.") INPUT Enter an adjective: clumsy Enter a noun: dummy Enter a verb: screeching Enter a verb: threw Enter a verb: crashed OUTPUT Once there was a clumsy dummy. The clumsy dummy was screeching with his eyes closed. The clumsy dummy threw a stone. He crashed face-flat on the ground.
@VarunNigudkar
@VarunNigudkar 6 ай бұрын
noun1 = input("Enter noun: ") verb1 = input("Enter verb: ") noun2 = input("Enter noun: ") verb2 = input("Enter verb: ") device = input("Enter device name: ") print(f"Today {noun1} uploaded his video") print(f"I was {verb1}ing Po*n") print(f"My friend {noun2} told me about {noun1}'s video") print(f"I {verb2} my {device} and searched it up") RESULT Today Brocode uploaded his video I was Watching Po*n My friend Stepsis told me about Brocode's video I Gropped my Sis phone and searched it up
@hansdevice3285
@hansdevice3285 7 ай бұрын
One problem I noticed with type casting your inputs as a float or an int like this: x = float(input("Prompt: ")) is that it breaks if you input a letter, or if you just hit enter. I found that doing something like this: x = input("Prompt: ") while not x.isnumeric(): x = input("Prompt and explanation of input requirements: ") x = float(x) both solves this problem and explains to the user what they did wrong. (x.isnumeric is explained in BroCode's string methods video) If someone knows a more compact way to protect against incorrect inputs, please let me know.
@abdulhannan-18
@abdulhannan-18 10 ай бұрын
item = input("Enter the item: ") quantity = int(input("Enter the quantity: ")) price = float(input("Enter the price: $")) total = price * quantity print(f"You bought {quantity} x {item}/s") print(f"Your total is: ${total}") Enter the item: Tuc Enter the quantity: 2 Enter the price: $40 You bought 2 x Tuc/s Your total is: $80.0
@dinasimoes6394
@dinasimoes6394 Жыл бұрын
Thanks so much for these precious lessons. Great job! I just don't understand how 4.99 * 9 = 44.910000000000004€? Is it a bug on Pycharm?
@MartinsAfoafo-xy5bh
@MartinsAfoafo-xy5bh 2 ай бұрын
adjective1 = input("Enter an adjective: ") noun = input("Enter a noun: ") adjective2 = input("Enter an adjective: ") verb = input("Enter a verb: ") adjective3 = input("Enter an adjective: ") print(f"Today i visited the {adjective1} aso rock villa") print(f"I saw {noun}") print(f"He was such a {adjective2} man") print(f"He was so {verb} to see me") print(f"He gave me a very {adjective3} car before leaving the villa") Output: Today i visited the Great aso rock villa I saw President Tinubu He was such a Kind man He was so Happy to see me He gave me a very Beautiful car before leaving the villa
@nirukadlur384
@nirukadlur384 3 ай бұрын
#Mad libs adjective = input("Enter the adjective:") noun = input("Enter the noun:") verb = input("Enter the verb:") print(f"Lionel Messi is the {adjective}.") print(f"Lionel Messi is born in {noun}.") print(f"Lionel Messi now {verb} in the MLS.")
@sceerlike
@sceerlike 11 ай бұрын
day = input("What day is it today?: ") time = input("Enter your meeting time schedule: ") place = input("Enter your school name: ") game = "Roblox" name = input("What is your name?: ") age = int(input("Enter your current age: ")) age = age - 2 print(f"Your name is {name}") print(f"You were {age} years old") print(f"Today is {day}") print(f"We have an urgent meeting with our friends on {time} at {place}") print(f"But I have work at home playing {game}") output: Your name is sceerlike You were 15 years old Today is friday We have an urgent meeting with our friends on 10:00 AM at kabupaten But I have work at home playing Roblox
@user-kd3el1qn1w
@user-kd3el1qn1w 11 ай бұрын
#madh libs 1. adjective1,2,3= wonderful, suspecious, amazed 2.noun= snow leopard 3.verb=amazing
@Marvin-c3d
@Marvin-c3d 2 ай бұрын
noun1 = input("Enter a noun: ") noun2 = input("Enter a second noun: ") noun3 = input("Enter a third noun: ") verb = input("Enter a verb in infinitive: ") adjective = input("Enter an adjective: ") print(f"When i came home, i saw {noun1} and {noun2} in the living room") print(f"They surprised me with a {noun3}") print(f"I was {verb}ing and i was {adjective}") Enter a noun: my friend Enter a second noun: my girlfriend Enter a third noun: cat Enter a verb in infinitive: screaming Enter an adjective: happy When i came home, i saw my friend and my girlfriend in the living room They surprised me with a cat I was screaminging and i was happy It's crazy how it worked
@FamilyFriendly-z4s
@FamilyFriendly-z4s 3 ай бұрын
this is what i did ---> print("MAD LIBS GAME!!!!!!") adjective = input("enter an adjective:") verb = input("enter an verb:") verb2 = input("enter an verb:") print("i went to a "+adjective+" zoo") print("i saw an bird "+verb) print("i also saw an ostrich "+verb2+" too")
@HsuMonMonThant
@HsuMonMonThant Жыл бұрын
What a good explanation. Thank you so much bro.
@hamzazad5258
@hamzazad5258 6 ай бұрын
this is the best tutorial out there
@user-lx7xd1hc4i
@user-lx7xd1hc4i 2 ай бұрын
#3.SHOPPING CART item = input("What item would you like to buy?: ") price = float(input("What is the price?: ")) quantity = int(input("How many would you like?: ")) total = price * quantity print(f"You have bought {quantity} x {item}/s") print(f"Your total is ₹{round(total, 2)}") Output: What item would you like to buy?: sweet What is the price?: 9.44 How many would you like?: 14 You have bought 14 x sweet/s Your total is ₹132.16
@user-ace96plays
@user-ace96plays 10 ай бұрын
NICELY DONE BRO...❤4/106
@KenichiSasaki-pl6yc
@KenichiSasaki-pl6yc 6 ай бұрын
Enter a noun: cafe Enter an adjective: big Enter a noun: samosa Enter an adjective: dancing Enter a ajective: amazed To today I went to a cafe I saw a big samosa the samosa was dancing I wasn amazed
@azmibinmuhammad7164
@azmibinmuhammad7164 Жыл бұрын
Awesome tutorial... thanks sir
@user-lx7xd1hc4i
@user-lx7xd1hc4i 2 ай бұрын
#1.MAD LIBS noun = input("Enter a noun: ") adjective = input("Enter a adjective: ") adjective2 = input("Enter a adjective: ") adjective3 = input("Enter a adjective: ") verb = input("Enter a verb: ") noun2 = input("Enter a noun: ") print(f"Today I ate {noun}") print(f"It was very {adjective}") print(f"I would {adjective2} to eat more dishes like this") print(f"It was so {adjective3} that I {verb}ed the whole {noun2}") Output: Enter a noun: meat Enter a adjective: tasty Enter a adjective: die Enter a adjective: delicious Enter a verb: clean Enter a noun: plate Today I ate meat It was very tasty I would die to eat more dishes like this It was so delicious that I cleaned the whole plate
@techshark2006
@techshark2006 Жыл бұрын
adjective1 = input("Enter an adjective: ") noun = input("Enter a noun: ") adjective2 = input("Enter an adjective: ") verb = input("Enter a verb: ") adjective3 = input("Enter an adjective: ") print(f"Today I went to {adjective1} zoo.") print(f"In an exhibit, I saw {noun}") print(f"{noun} was {adjective2} and {verb}ing") print(f"I was {adjective3}") output: Today I went to sus zoo. In an exhibit, I saw Sukesh Sukesh was fun and runing I was fast
@Thien-LocSeanNgo
@Thien-LocSeanNgo Ай бұрын
item = input("What item would you like to buy?: ") price = float(input("What is the price?: ")) quantity = int(input("How many would you like?: ")) total = price * quantity print(f"You have bought {quantity} x {item}/s") print(f"Your total is ${round(total, 2)}.") What item would you like to buy?: Hamburger What is the price?: 2.99 How many would you like?: 11 You have bought 11 x Hamburger/s Your total is $32.89.
@kszoknyik
@kszoknyik Жыл бұрын
once again, an excellent video. thank u!
@user-vc3tp8zj5s
@user-vc3tp8zj5s Жыл бұрын
this feeling, when in 4 free utube videos u found out more useful features, than in 40$ course...
@SplashAni_
@SplashAni_ Жыл бұрын
how are you today bro!
@BroCodez
@BroCodez Жыл бұрын
hi Splash
@РичардПагава
@РичардПагава Жыл бұрын
verb1 = input("who you see in street?: ") verb2 = input("he was shoked or calm?: ") verb3 = input("you are good releishenship with animel cat?: ") print(f"today i go to walk and see {verb1}") print(f"i take him to my house he was {verb2}") print(f"after 1 month we are {verb3}")
@closettherapy6948
@closettherapy6948 5 ай бұрын
Bro's always cooking ‼🗣💻
@abdulhannan-18
@abdulhannan-18 10 ай бұрын
adjective1 = input("Enter an adjective: ") noun1 = input("Enter a noun: ") adjective2 = input("Enter an adjective: ") verb1 = input("Enter a verb: ") print(f"Today I went to a {adjective1} university.") print(f"In the exhibition, I saw {noun1}.") print(f"Upon seeing {noun1}, I was very {adjective2}.") print(f"{noun1} was {verb1}ing.") Enter an adjective: goood Enter a noun: Abdul Enter an adjective: excited Enter a verb: study Today I went to a goood university. In the exhibition, I saw Abdul. Upon seeing Abdul, I was very excited. Abdul was studying.
@vihanga_induwara__00
@vihanga_induwara__00 7 ай бұрын
adjective1 = input('what is the adjective : ') adjective2 = input('what is the adjective : ') adjective3 = input('what is the adjective : ') adjective4 = input('what is the adjective : ') print(f"today is my {adjective1} birthday") print(f"I celebreat it {adjective2}") print(f"my {adjective3} mom was planed it") print(f"that day in {adjective4}")
@MOMI-h7m
@MOMI-h7m 5 күн бұрын
loved it alot bro code 🚀🦍
@Afghanistanfutsalfans
@Afghanistanfutsalfans Жыл бұрын
Love the way you explain! so energetic! Thank you!
@mikemartelles7688
@mikemartelles7688 7 ай бұрын
Thank you for these videos! my "textbook" (being generous with that term) is nearly useless
@abdulsami4607
@abdulsami4607 8 ай бұрын
yesterday was amazing met a few new friends we were all chilling well all was awesome
@WINDOWSUSER-q4s
@WINDOWSUSER-q4s 10 ай бұрын
NICELY DONE...❤
@cozycubix
@cozycubix Жыл бұрын
YOU made it EASY : Thanks
@tme2711
@tme2711 Жыл бұрын
Enter an adjective: sus Enter an noun: Bishal Enter an adjective: hiding Enter an verb: jrk Enter an adjective: WTF Today i went to a sus place. Then I saw my friend Bishal. Bishal was hiding and jrking. I was like...WTF
@TypicalVole2437
@TypicalVole2437 Жыл бұрын
I learned this just now thanks, onto the next video!
@julkarnayenshish1712
@julkarnayenshish1712 Жыл бұрын
Bro, can you make a video about some of the best books for programming? And some pros and cons about following books or internet materials for coding.
@erenakyurek8076
@erenakyurek8076 Жыл бұрын
that would be cool tbh
@RUNE-5
@RUNE-5 Жыл бұрын
Using books is not really worth it i see that your comment is 1month old how is your coding proces been so far
@julkarnayenshish1712
@julkarnayenshish1712 Жыл бұрын
@@RUNE-5 totally agreed. I made that comment when i didn't't even start programming. But books are useless in coding i guess. Didn't feel the necessity yet and I'm doing pretty well without it
@basscat8110
@basscat8110 Жыл бұрын
Awesome Bro, keep it up💪
@makoblox
@makoblox Жыл бұрын
good content keep it up
@nerooreo
@nerooreo Жыл бұрын
noun1 = input("Enter a noun: ") adjective1 = input("Enter an adjective: ") noun2 = input("Enter a noun: ") adjective2 = input("Enter an adjective: ") adjective3 = input("Enter an adjective: ") print(f"There was a {noun1} today at the store.") print(f"His name was {noun2}, and he was darn {adjective1}") print(f"And I was {adjective3}") INPUT: Enter a noun: dog Enter an adjective: nice Enter a noun: buddy Enter an adjective: blue Enter an adjective: shocked OUTPUT: There was a dog today at the store. His name was buddy, and he was darn nice And I was shocked
@pwyatt4633
@pwyatt4633 10 ай бұрын
a = input("say what ever: ") b = input("say what ever: ") c = input("say what ever: ") print(f"today i went to a {a} house") print(f"i got somthing stuck in my {b}") print(f"then i went on a {c} for fun") print(f"the end. ")
@wmstram1
@wmstram1 Жыл бұрын
Watched it. Liked it.
@RFN0954
@RFN0954 Жыл бұрын
noun1 = "gamer" noun2 = "tacos" noun3 = "eminem" adjective1 = "spicy" verb1 = "rapp" print(f"""I am a {noun1}. My favourite snack is {noun2}. It is very {adjective1}. I like {adjective1} foods. Anyways, after finishing {noun2} oneday, I saw {noun3}. {noun3} was {verb1}ing very loudly. {noun3} really made a scene that day""")
@shamyal-hashimy2245
@shamyal-hashimy2245 3 ай бұрын
adjective1 = input("what are you?") noun1 = input("where did they put you?") noun2 = input("with what?") verb1 = input("do you like it?") print(f"{adjective1}? i was {adjective1} once") print(f"they put me in a {noun1}") print(f"a rubber {noun1}") print(f"with rubber {noun2}") print(f"{noun2}? i {verb1} {noun2}") print(f"they make me {adjective1}") what are you? crazy where did they put you? room with what? rats do you like it? hate crazy? i was crazy once they put me in a room a rubber room with rubber rats rats ? i hate rats they make me crazy
@Devilhunter69
@Devilhunter69 Жыл бұрын
noun=input("write a noun ") adjective1=input("write an adjective ") noun2=input("write another noun ") print(f"yesterday i will be visiting{noun}") print(f"people say he is very{adjective1}") print(f"he lives in {noun2}") output= yesterday i will be visitingthe wok people say he is verysussy he lives in ohio i love python
@ScienceVashu
@ScienceVashu Жыл бұрын
My mad lib Code ------------------ name = input("Enter a name") noun = input("enter a noun") noun1 = input("enter a noun") adjective = input("enter an adjective") print(f"Today I went to museum with {name} ") print(f"There I bought a {noun}") print(f"Now we are going to {noun1}") print (f"I am very {adjective}") ---------- STORY ----------- Today I went to museum with Tim cook There I bought a Desert Now we are going to My desert I am very Excited
@muniz6180
@muniz6180 Жыл бұрын
Amazing tutorial dude
Math in Python is easy + exercises 📐
13:51
Bro Code
Рет қаралды 102 М.
Type casting in Python is easy 💱
7:37
Bro Code
Рет қаралды 112 М.
У ГОРДЕЯ ПОЖАР в ОФИСЕ!
01:01
Дима Гордей
Рет қаралды 8 МЛН
Остановили аттракцион из-за дочки!
00:42
Victoria Portfolio
Рет қаралды 2,8 МЛН
Sitecore Headless Development User Group 9
2:30:45
Martin Miles
Рет қаралды 26
Python User Input & Control Flow | Python tutorial
22:42
Dave Gray
Рет қаралды 17 М.
10 Nooby Mistakes Devs Often Make In Python
24:31
Indently
Рет қаралды 62 М.
*Next-door 10x Software Engineer* [FULL]
4:50
Programmers are also human
Рет қаралды 608 М.
Reacting to Controversial Opinions of Software Engineers
9:18
Fireship
Рет қаралды 2,1 МЛН
How I Would Learn Python FAST in 2024 (if I could start over)
12:19
Thu Vu data analytics
Рет қаралды 307 М.
Python lists, sets, and tuples explained 🍍
15:06
Bro Code
Рет қаралды 271 М.
you will never ask about pointers again after watching this video
8:03
Low Level Learning
Рет қаралды 2,2 МЛН
If statements in Python are easy (if, elif, else) 🤔
8:21
Bro Code
Рет қаралды 130 М.
10 Important Python Concepts In 20 Minutes
18:49
Indently
Рет қаралды 107 М.