Python programming codes
43 subscribers
25 photos
1 video
83 files
82 links
Uploading All programming codes are updating Daily
ask doubts in comment box πŸŽβ˜‘οΈ
Download Telegram
✨ Excel - Formulas & Functions Beginner to Expert Course 2023 ✨

Microsoft Excel Formulas and Functions, VLookup, HLookup, XLookup, Index, Match, Dynamic Array Formulas. MS Excel 2021

https://www.udemy.com/course/excel-formulas-functions-beginner-to-expert-course
> Code:
SUBHANALLAH_021323

πŸ’Œ Claim Now For Free
For which type of error does the interpreter halts and reports the error but does not execute the program?
Anonymous Quiz
33%
runtime error
67%
syntax error
0%
run time error
0%
all of these
For which type of error does the interpreter runs the program but halts at error and reports the error as an "Exception"?
Anonymous Quiz
0%
semantic error
33%
syntax error
33%
all type of errors
33%
runtime error
For which type of error does the interpreter runs the program and does not report an error?
Anonymous Quiz
33%
syntax error
0%
semantic error
67%
runtime error
0%
all type of errors
What do you type to enter the interactive help mode of Python?
Anonymous Quiz
25%
HELP
0%
help
75%
help()
0%
save
In IDLE shell, what is the keyboard shortcut for the previous command in history on Windows/Linux?
Anonymous Quiz
50%
Ctrl + P
0%
Alt + P
25%
Page Up
25%
Page Down
In IDLE shell, what is the keyboard shortcut for the next command in history on Windows/Linux?
Anonymous Quiz
50%
Alt + N
50%
Ctrl + N
0%
Page Up
0%
Page Down
what is the output of the python code?

list = ["xyz","zara","pynative"]
print(max(list))
def x(values):
values[0] = 1
v = [2,3,4] x(v) print(x)
Anonymous Quiz
25%
[1,2,3]
0%
[2,3,4]
25%
Error
50%
None
#Display the calendar by using the python code

import calendar #first import the calendar library module
from datetime import*
#year = 2023 #mention the past or present or future years

year = date.today().year
month = 1 #mention the 1 to 12 month numbers βˆ†βˆ† starting with no zero (0) mention ortherwise the program error display

#then after the print operation to display the output
print(calendar.month(year,month))

print("today date is",date.today().day)
output color Changing in python interpreter

from colorama import Fore

print(Fore.RED + "smw_media")

print(Fore.YELLOW + "smw_media")

print(Fore.BLUE + "smw_media")

print(Fore.GREEN + "smw_media")

print(Fore.CYAN + "smw_media")
πŸ‘1
#print the current date and time
import datetime

now = datetime.datetime.now()

print("Current date and time")

print(now.strftime("%Yyear%mmonth%dday%Hhours%Mminutes%Sseconds"))
Here is the HTML code for an "Add to Cart" button that you can use in your website or project:


<div class="container">
<button class="add-to-cart-button">
<svg
class="add-to-cart-box box-1"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect width="24" height="24" rx="2" fill="#ffffff" />
</svg>
<svg
class="add-to-cart-box box-2"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect width="24" height="24" rx="2" fill="#ffffff" />
</svg>
<svg
class="cart-icon"
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="#ffffff"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<circle cx="9" cy="21" r="1"></circle>
<circle cx="20" cy="21" r="1"></circle>
<path
d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"
></path>
</svg>
<svg
class="tick"
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
>
<path fill="none" d="M0 0h24v24H0V0z" />
<path
fill="#ffffff"
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM9.29 16.29L5.7 12.7c-.39-.39-.39-1.02 0-1.41.39-.39 1.02-.39 1.41 0L10 14.17l6.88-6.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-7.59 7.59c-.38.39-1.02.39-1.41 0z"
/>
</svg>
<span class="add-to-cart">Add to cart</span>
<span class="added-to-cart">Added to cart</span>
</button>
</div>
Here is the Javascript code for an "Add to Cart" button that you can use in your website or project:





To create a pop-up display that shows "added to cart" when a user clicks the "Add to Cart" button, we need to add some JavaScript code. We can use the setTimeout() function to delay the execution of our code for a certain period of time after the user clicks the button.




addToCartButton = document.querySelectorAll(".add-to-cart-button");
document.querySelectorAll('.add-to-cart-button').forEach(function(addToCartButton) {
addToCartButton.addEventListener('click', function() {
addToCartButton.classList.add('added');
setTimeout(function(){
addToCartButton.classList.remove('added');
}, 2000);
});
});
Output of an "Add to Cart" Button: