Posts

Showing posts from February, 2025

python basic codes

[04-02-2025 18:04] Salim Shaikh: Result student__________________________________ [04-02-2025 18:04] Salim Shaikh: marks=input("enter marks:") if(marks>"95"):     print("A++") elif(marks>"80"):     print("B") elif(marks>"60"):     print("C") elif(marks>"40"):     print("D") else:     print("fail") [04-02-2025 18:27] Salim Shaikh: single line condition________________________ [04-02-2025 18:27] Salim Shaikh: food=input("food:") food="yes"if food=="cake" else "no" print(food) [04-02-2025 19:28] Salim Shaikh: clever if ternary operator ____________________ [04-02-2025 19:28] Salim Shaikh: age=int(input("enter yor age:"))  vote=("no","yes")[age>=18] print(vote) [06-02-2025 10:40] Salim Shaikh: Count thr occurrence substr__________________________________________________ [06-02-2025 10:40] Salim Shaikh: #coun...

C first code

 #include<stdio.h>                        int main() { printf("new journey"); }