Python’s saga continue
Today I am learning reading file with python using with as : code block and some string manipulation. it is quite similiar to C# which I have spending many years coding with so I could have skipped this but I will finish learning it by the book.
Spanish – Manners Continue
con permiso(kohn pehr-mee-soh) = Pardon/Excuse me (with permission)
So these words below mean “Excuse me/Pardon/I’m Sorry” but they are used in different context:
- Disculpe – used when getting somone’s attention (Ex: cashier, a waiter, etc.)
- Perdon – used then apologizing for small things (Ex: bumping into someone)
- Lo siento – a solid “I am sorry”. Can be interchangeable with perdon.
- Con permiso (with permission) – used when interrupting someone.
Prueba (prweh-bah) = Quiz = Test
- You are walking in a store and accidentally nudge someone as you pass by, you say […]
- You are sitting in a restaurant and want some more water and you ned to call over the waiter, you say […]
- You are having a conversion wtih someone and want to interject, you say […]
- You are hungry and you eat your roommate’s last homemade cookie, not knowing that she was saving it, you say […]
Solución(soh-loo-syohn) = solution = answer
- Pardon
- Disculpe
- Con permiso
- Lo siento
café(kah-feh) = coffee
agua(ah-gwah) = water
cerveza(sehr-beh-sah) = beer
Me pone …? (Meh poh-nehr) = Can you bring me …? = Can I have …?
Me pone un café? = Can you bring me cafe? or Can I have a cofee?
Me pone un agua? = Can you bring me water? or Can I have a water?
Me pone una cerverza? = Can you bring me beer? or Can I have a beer?
Me pone una cerveza, por favor? = Can I have a beer, please?
Resumen (rreh-soo-mehn) = Review
- Por favor = Please
- [Muchas] gracias = Thank you [very much]
- De nada = you’re welcome (it is nothing)
- Lo siento = I am sorry
- Disculpe = Execuse me
- Perdon = Execuse me ~ I am sorry
- Con permiso = Excuse me (with permission)
- Agua = Water
- Café = Coffee
- Me pone …? = Can I have …? = Can you bring me …?
Permanent Eye Color Change
With around 12K usd, client can undergo an operation done by Dr. Movshovich’s to change his clients’ eyes color permanantly – (https://www.keratonyc.com/ PERMANENT. SAFE. RELIABLE. PAINLESS. IMMEDIATE.)
Spanish – Manners
modales(moh-dah-lehs) = manners
por favor(pohr fah-bohr) = please
[Muchas] Gracisas (moo-chahs grah-syahs) = Thank you [very much]
de nada(deh nah-dah) = You’re welcome
lo siento(loh syehn-toh) = I am sorry
disculpe(dees-kool-peh) = I am sorry = Execuse me
perdón(pehr-dohn) = = I am sorry = Execuse me
Spanish – Greeting continue
adiós – ‘ah-dyohs’ = Good bye
hasta luego – ‘ahs-tah lweh-goh’ = See you later
Review
Hola = Hello
Soy [nombre] = I am [name]
Me llamo [nombre] = My name is [name]
Como te llamas? = What is your name?
Mucho gusto = Nice to meet you
Bueno dias = Good morning
Buenas tardes = Good afternoon
Buenas noches = Good evening/Good night
Como estas? = How are you?
Estoy [muy] bien = I am [very] well
y tu? = And you? And yourself?
Adios = Good bye
Hasta luego = See you later
Practica
A: Hola
B: Hola
A: Me llamo Vic. Como te llamas?
B: Me llamo Hellene. Mucho gusto
A: Mucho gusto. Como estas?
B: Estoy bien, y tu?
A: Estoy bien.
B: Hasta luego
A: Adios
Felicidades! – ‘feh-lee-see-dah-dehs’ = Congratulation!
We concluded the Greeting lesson.
Python’s saga continue
I have to agree that it is one of the powerful feature of this language. In C#, it has similiar feature but less power since you can only assign ‘same value’ to multiple variables within the same line. But with this powerful feature of python, you can assign multiple values to multiple variables within the same line. As of this writing, in C# it also now has this feature but still less powerful than this since we are required to use var keyword and install additional NuGet package called “System.ValueTuple”.
Anyways, I gave this powerful python’s feature a test and voila I like it:
Here is the practical example: we have a file name called fn which is assigned with string “Abi-10-50m-Back.txt” where Abi is the swimmer name, 10 is her age, 50m is her swimming distance and last but not least Back is her swimming style. Below example is to extract these information from the file name vairable fn into its own separate variable. I am happy with python as it can accomplish this task with mimal code than if using C# for the split string in C# items would be returned as an array. And to access each of them requires using arrary with its index and have to declare each of variable per arrary index for code readibility but with python, less code and it is easy to read.
Spanish – Greeting continue
Buenos días – ‘bweh-nohs dee-ahs’ = Good morning.
Buenas tardes – ‘bweh-nahs tahr-dehs’ = Good afternoon.
Did you notice Buenos and Buenas?
due to dias is a masculine so that is why the ‘O’, Buenos whereas tardes is a faminine that is why the ‘A’, Buenas.
Buenas noches – ‘bweh-nahs noh-chehs’ = Good evening or Good night.
¿Cómo estás? – ‘koh-moh ehs-tahs’ = How are you?
Estoy [muy] bien – ‘ehs-toy [mwee] byehn’ = I am [very] well.
¿Y tú? – ‘ee too’ = And you? or And yourself?
Práctica – Practice
A: Hola, buenas tardes! (Hello, good afternoon!)
B: Hola, buenas tardes! (Hello, good afternoon!)
A: ¿Cómo estás? (How are you?)
B: Estoy bien, ¿Y tú? (I am fine. And you?)
A: Estoy muy bien. Gracias! (I am very well. Thank you!)
Ok before we end this session today let’s have a quiz from last session here: https://quizlet.com/866928055/spanish-greeting-flash-cards/?i=3ejwy2&x=1qqt
Spanish – Greeting
Hola – “ola” where H is alwasys silent. It means Hello.
Nombre – “Nombrei”. It means Name
Soy [Nombre] = I am [Name]. Ex: Soy Vic = I am Vic. (less common in greeting)
Me llamo [Nombre] = My name is [Name]. Ex: Me llamo Vic = My name is Vic (more common/formal greeting than Soy). Note that e in Spanish is always pronounced as ei and ll is pronounced as Y so it is actually sounded like Mei yamo Vic.
¿Cómo te llamas? = What is your name? where ¿Cómo means How in this context so it also means How do you call yourself?
Mucho gusto – “moo-choh goos-toh” = Nice to meet you. Individually Mucho means a lots whereas gusto means pleasure. All combined means Nice to meet you.
Práctica = Practice
A: Hola (Hello)
B: Hola (Hello)
A: ¿Cómo te llamas? (What is your name?)
B: Me llamo Vic (My name is Vic).
¿Cómo te llamas? (What is your name?)
A: Me llamo Hellene (My name is Hellene).
Mucho gusto (Nice to meet you)
B: Mucho gusto (Nice to meet you)
Python’s saga continue
print dir combo mambo is very handy as other have said. We can see attributes/methods associated with any object in python. here now I can see all the methods I can use against my string object variable fn. And string in python is immutable which is the same thing in C#.
Now if I want to know; for instance, what the method zfill actually would do on the string object I can use print with help BIF which will print the documentation of zfill telling me all about zfill method’s fuctionality. (It might be equivalent C# String.padleft(…))