diff --git a/cfu-data-types.ipynb b/cfu-data-types.ipynb index e0fee02..657d3ee 100644 --- a/cfu-data-types.ipynb +++ b/cfu-data-types.ipynb @@ -49,11 +49,43 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 17, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "Salary_after_expenses: 800.0\n", + "¿Es menor a 500? False\n", + "Tipo: \n" + ] + } + ], "source": [ - "# Your code here\n" + "name = input(\"¿Cómo te llamas?\")\n", + "print(input(\"¿Cómo te llamas?\"))\n", + "print(type(input(\"¿Cómo te llamas?\")))\n", + "\n", + "Age= input(\"¿Cuántos años tienes?\")\n", + "print(input(\"¿Cuántos años tienes?\"))\n", + "print(type(input(\"¿Cuántos años tienes?\")))\n", + "\n", + "Addres= input(\"Introduce tu dirección\")\n", + "print(input(\"Introduce tu dirección\"))\n", + "\n", + "Salary_after_expenses = input(\"¿Cuanto salario ahorras? \")\n", + "Salary_after_expenses_num = float(Salary_after_expenses)\n", + "es_menor_500 = Salary_after_expenses_num < 500\n", + "\n", + "print(\"Salary_after_expenses:\", Salary_after_expenses_num)\n", + "print(\"¿Es menor a 500?\", es_menor_500)\n", + "print(\"Tipo:\", type(es_menor_500))" ] }, { @@ -80,12 +112,13 @@ "\n", "- *You can use the len() function to get the length of a string.*\n", "- *Search string methods to accomplish the other steps. Recommended External Resources: [Python String Methods](https://www.w3schools.com/python/python_ref_string.asp)*\n", - "- *Use method chaining to simplify your code. If you are not sure what it is, read this tutorial before: https://pyneng.readthedocs.io/en/latest/book/04_data_structures/method_chaining.html*\n" + "- *Use method chaining to simplify your code. If you are not sure what it is, read this tutorial before: https://pyneng.readthedocs.io/en/latest/book/04_data_structures/method_chaining.html*\n", + "." ] }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -102,7 +135,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ @@ -112,7 +145,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -126,7 +159,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.13" + "version": "3.14.4" } }, "nbformat": 4,