Good morning guys
I believe, you were rest well.
So now it's the time to keep learn our journey for machine learning.
Since we're studying the phase 1: Python programming let's learn it together without any borring.
For those who learned python before, it's good to jump into the next step.
I believe, you were rest well.
So now it's the time to keep learn our journey for machine learning.
Since we're studying the phase 1: Python programming let's learn it together without any borring.
For those who learned python before, it's good to jump into the next step.
Then guys in this morning I have just covered Conditionals in python: lemme share for you what I have already understand: Conditionals: if, if-else, if-elif-else, if-if, Comparation <,>,<=,>=, !=, == Logic program: and(&), or(|), not
Write a program that accept a score from the user then display their grade?.
hint use if-elif-else print("A+") if score >=90, print("A") if score >=80 print("B"),...else print("F") I'm waiting for you try to to do👆
Oh gus, how's going on😁 now I'm tired and now I need to check my writing speed, and I'll share for you my score. just if you want to practice that try it on monkeytyping
SamiTech Code
Write a program that accept a score from the user then display their grade?. hint use if-elif-else …
✅I wish you tried that ok we can solve it using; if-elif-els score = float(input("Enter your score: "))
if score >= 90 and score < 100:
print("Your grade is A+")
elif score >= 80 and score < 90:
print("Your grade is A")
elif score >= 70 and score < 80:
print("Your grade is B")
elif score >= 60 and score < 70:
print("Your grade is C")
elif score >= 50 and score < 60:
print("Your grade is D")
else:
print("F")
❤1
SamiTech Code pinned «✅I wish you tried that ok we can solve it using; if-elif-els score = float(input("Enter your score: ")) if score >= 90 and score < 100:…»
Hey family good evening🌅
Can you share for us.
Today, How Have you been used:)👀
Can you share for us.
Today, How Have you been used:)👀
Guys now I'm studying Exception in python and the following concept will be covered:
SyntaxError. ValueError. try. except. NameError. else. pass. raise After I finish this I'll share for you what they're meant
❤1
SamiTech Code
What we meant by Exception and why we use it?
✅Exception means when the error occurred during the runtime.
Therefore, SyntaxError is one of the type of Exception so instead of seeing the error, it's good to use Exception handling! hey what's the error in the above code?👆 since it's programmer fault we have to recheck our code. 👀 Try it by your self and send the correct code in the comment sections.
eg: display your by accepting prompt from the user! x = int(input("How old are you? "))
print(f"I'm {x} years old) 🙆 SyntaxError: unterminated f-string literal (detected at line 3)
Therefore, SyntaxError is one of the type of Exception so instead of seeing the error, it's good to use Exception handling! hey what's the error in the above code?👆 since it's programmer fault we have to recheck our code. 👀 Try it by your self and send the correct code in the comment sections.
Use try-except to handle exception: """Write a program that accept from the user then display his age. hint: in this code programmers didn't make any mistake but it's during the user fault so, instead of seeing the error use exception handling"""👀
✅Answer
✅Answer
try:
age = int(input("How old are you? "))
print(f"I'm {age} years old. ")
except ValueError:
print("Please your age must be integer! ")
if age<0:
print("your age must be positive")
❤1
Good afternoon guys,😀
How's your study progress👈
And also don't forget to share our telegram channel for others may be the will learn what they didn't know.Let's go forward together.💪
How's your study progress👈
And also don't forget to share our telegram channel for others may be the will learn what they didn't know.
Hey there do you know the following if you know it's good, ifn't try to do it👇
after you practiced this write in the comment section what you understand! I'll prepare for you simple exam challenges Don't stop learning, have a discipline rather than motivation😁
1.Python Syntax:Your 1st program print("Let's learn together") PS C:\Users\God is with me\Desktop> cd Python
PS C:\Users\God is with me\Desktop\Python> python yourfilename.py result is : Let's learn together
2.Python Indentation:refers to the spaces at the beginning of a code line. In python this's required but like in other like Java, C++,...it's optional just it's for readability only👇. if 5 > 2:
print("Five is greater than two!") #indentations line occurred ifn't we got an indentation error
3.Python Variables:In Python, variables are created when you assign a value to it: x = 8
y = "Hello, World!" print(x) #8 print(y) #Hello, World! or to print in one line👉🏾 print("x is {x} and y is {y}") # x is 8 and y is Hello, World!
4.Comments In Python: tells what that program is doing, NB:comment isn't executed for single line use #, for multi-line use """ Multi-line comment""" #This is a single line comment.
print("Hello, World!")
after you practiced this write in the comment section what you understand! I'll prepare for you simple exam challenges
👍3
SamiTech Code pinned «Hey there do you know the following if you know it's good, ifn't try to do it👇 1.Python Syntax:Your 1st program print("Let's learn together") …»
Q1:Indentation in Python is for readability only. For each answers give your reason in the comment sections?
Anonymous Quiz
18%
True
82%
False