Wednesday, 4 October 2023

Python Code Challenges #1

Questions

1. Write python code to print   Let's learn Python

    a) Print ('Let's learn Python')

    b) print ("Let's learn Python")

    c) print('Let\'s learn Python')

    d) print ('Let"s learn Python')


2. Write python code to calculate gravitional_force F = G * M * m / r * r for the given constant G = 6.67 x (10**-11) ,Msun = 2.0 x (10**30), mEarth = 6.0 x (10 ** 24) and r = 1.5 x (10 ** 11)

  

    a) gravitional_force =  (G * M * m) / (r ** 2)

    b) print ((G * M * m) / (r ** 2))

    c) print(gravitional_force)

    d) print ((G * M * m) / (r * r))


3. For the given price = 350, what will be the output for the given code:

price = 350

if (price >= 300):
  price *= 0.7 # (1 - 0.3)
elif (price >= 200):
  price *= 0.8 # (1 - 0.2)
elif (price >= 100):
  price *= 0.1 # (1 - 0.1)
elif (price >= 50):
  price *= 0.05 # (1 - 0.05)
else:
  price

print (price)

    a) 245

    b) 245.0

    c) 300

    d) 300.0


4.  What will be the input when the out put is 7777777722222, if the function code is as given below

def rep_cat(x, y):
    return str(x) * 8 + str(y) * 5

print (rep_cat(7, 2))


    a) '7','2'

    b) 7,2

    c) 72

    d) 77777722222


5. Write comprehensive python function code for printing fibonocci numbers foth given number n = 10:

    a) 

def fib(n):
first = 0
  second = 1

  if n < 1:
    return -1

  if n == 1:
    return first

  if n == 2:
    return second

  count = 3
  while count <= n:
    fib_n = first + second
    first = second
    second = fib_n
    count += 1
  return fib_n

n = 10
print (fib(n))

    b) 

n = int(input("Enter a number: "))
a = b = 1

while(b <= n):
     print(b,end=" ")

    c) 

def fibonacci_sequence():
    a,b = 1,1
    while True:
        yield a
        a,b = b, a+b
generator = fibonacci_sequence()
for i in range(10):
    print(generator.__next__())
n = 10
fibonacci_sequence()

       d 

fibonacci_numbers = [0, 1]
n = 10
for i in range(2,n):
    fibonacci_numbers.append(fibonacci_numbers[i-1]+fibonacci_numbers[i-2])

 

Answers

Answers

1. b

2. b, d

3. b

4. b

5. d


If you are very keen to test in python, try these 

 Python Quizzes

Python Quiz #1[Basics] [25]

https://forms.gle/CHZHzT9ZE2D824aA7

Python Quiz #2 [Arrays, Data Types][25]

https://forms.gle/9SjooxdDCV5Xokwk6

Python Quiz #3 [List, Tuple, Set][25]

https://forms.gle/kE8Qrs2woRrpdAXe7

Python Quiz #4 [Dictionary][25]

https://forms.gle/QSRjKTUn7uijQ37EA

Python Quiz #5 [Operators, Loops, Functions][25]

https://forms.gle/G45BzqhcVnuH7BL37

Python Quiz #6 [Classes and Objects][40]

https://forms.gle/T2RX4ZGG1R3RfU4cA

Python Quiz #7 [NumPy][35] 

https://forms.gle/4qfTemp5mDU69CNc7

Python Quiz #8 [Pandas][25] 

https://forms.gle/V1N4QGM9BvHLVSpk6

Python Quiz #9 [Matplotlib][25]

https://forms.gle/cuT32YCvmj1i14Pz9

Python Quiz #10 [scikit-learn][25]

https://forms.gle/DtYgrAYPWrNz82gt5


 HTML Quiz

HTML Quiz #01 [Basics][60]

https://forms.gle/Nut78ZFwEsJw8YhB6

EXCEL Basics #1 [60]

EXCEL Pivot MCQ #2[25]

https://forms.gle/kJSgTqBZG1Ey99YW8

EXCEL Formatting MCQ #3[25]

https://forms.gle/By2SPEMg8mh9UGiS7

EXCEL Lookup+ MCQ #4

https://forms.gle/pFyNdrSPDzMVhEj38

 Other Third Party Quiz Web Sites:

Other Third Party Quiz Web sites

https://realpython.com/quizzes/

https://pynative.com/python/quizzes/

https://www.geeksforgeeks.org/python-quizzes/

https://pythongeeks.org/python-quiz-test/

https://www.w3schools.com/python/python_quiz.asp









Monday, 2 October 2023

Most Useful Research Tools for Ph.D. Students

 

#1 connectedpapers.com

1. https://ametodl.blogspot.com/2023/10/easy-research-literature-tool-1.html

#2 paper-digest.com

2. https://ametodl.blogspot.com/2023/10/most-useful-easy-research-literature_2.html

# 3 scholarcy

3. https://ametodl.blogspot.com/2023/10/most-useful-easy-research-literature_96.html

#4 writefull

4. https://ametodl.blogspot.com/2023/10/most-useful-easy-research-literature.html

Most Useful Easy Research Literature Tool #4 writefull

Go to web site 

https://www.writefull.com/

To rephrase, review, cite and reword in easy language.


Most Useful Easy Research Literature Tool #2 paper-digest.com

 Go to web site  

https://www.paper-digest.com/ to Get the idea in 3 minutes, Understand academic articles briefly. Learn more in less time (summarize quickly).



Most Useful Easy Research Literature Tool #3 scholarcy

Go to web site 

https://www.scholarcy.com/.

You have to sign up to use this tool. 

Best assistive technologies for college students


5 Steps to Faster Learning


1. Suggests background reading.

2. Highlights important points.
3. Creates a referenced summary.
4. Finds the references.
5. Extracts tables and figures

Easy Research Literature Tool #1 connectedpapers.com

Go to web site connectedpapers.com


 type RM. chandrasekaran in text box and click build graph button


see the four icons(links) red circled connected papers, semantic scholar, doi publisher page, google scholar


when you click connectedpaper icon in the first research paper you will get screen similar to page as shown below: Visually you can understand about research.


When you click semantic scholar, you will get 


When you click publisher on [doi], you will get 
When you click google scholar, you will get 


after the title you can see the two elliptical buttons Prior works and Derivative works. When you clcik prior works

when you click derivative, you can see page as shown below:


From the above screen shots you will understand all related literature, authors and their works, referenced papers, referred(cited) papers, you can understand. It is 360 degree view of your research paper and work.


HTML tags for Google SEO

SIMPLE HTML TAGS

You have to understand seach "intent" and then bring quality content.

By using the following HTML tags, you can make your web site more visible.

1. <TITLE> tag

<title>Annamalai University</title>

Simple from the point of view of target audience, without stop words, max 60 charecters, Title relevant to content, use dates, questions or nos. 

Give Each page different title. Don't duplicate title in web site pages.

2. <h?> tags    

<h1></h1> – usually reserved for webpage titles.

<h2></h2> – highlights the topic of the title.

<h3></h3> – reflects points in regards to the topic.

<h4></h4> – supports points from <h3>.

<h5></h5> – not often used, but great for supporting points of <h4>.

3.  Add alt element in img tags in images

<img src="Annamalai.jpg" alt="Annamalai University"> 

Without the ALT tag, search engines don’t know what the image is about. And this could reduce exposure during image searches

55% of Visitors Read Your Articles For 15 Seconds or Less

4.  Fine-Tune Meta Description Tags

HTML meta tags – a crucial component for SEO success.

Using the right meta tags the right way is all about communicating to the search engines:

  • What your page is about.
  • How to read it.
  • Who should see it.

With that in mind, let’s go over which meta tags are crucial for SEO, and how to use them well.

<meta name="description" content="Annamalai University AMET NICHE Education Maritime Education.">

To refresh content:

<head>
  <meta charset="UTF-8">
  <meta name="description" content="Free Web tutorials">
  <meta name="keywords" content="HTML, CSS, JavaScript">
  <meta name="author" content="John Doe">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
</head>

from Google Central for detailed meta tag attributes.

More Examples from w3schools.com

Define keywords for search engines:

<meta name="keywords" content="HTML, CSS, JavaScript">

Define a description of your web page:

<meta name="description" content="Free Web tutorials for HTML and CSS">

Define the author of a page:

<meta name="author" content="John Doe">

Refresh document every 30 seconds:

<meta http-equiv="refresh" content="30">

Setting the viewport to make your website look good on all devices:

<meta name="viewport" content="width=device-width, initial-scale=1.0">

5. Use open graph tag in Meta Tag

<meta name="og:title" property="og:title" content="Annamalai University Courses">


6 Use Twitter card tags

<meta name="twitter:card" content="university">


7 . Use Canonical Tags when Appropriate

<link rel="canonical" href="https://annamalaiuniversity.ac.in/">


8. Responsive Web Site Tags

<meta name="viewport" content="width=device-width, initial-scale=1">


9. Nofollow Attributes

External/outbound links are the links on your site pointing to other sites. Inbound links are important. Nofollow links can directly help with your SEO. Nofollow links can bring you traffic.

<a href="http://backlinks.com/keyword-research" target ="_blank" rel="noopener"> Keyword Research : Definitive Guide </a>

<a href="https://apple.com/">Apple</a>

<a href="https://apple.com/" rel="nofollow">Apple</a> with no follow attribute.

How to check with competitor. Please refer  tool https://www.semrush.com/analytics/backlinks/

10. Meta robots tag

<meta name="robots" content="index, archive"/>

Below are some of the parameters most commonly used with robots meta tags. You can use any number of them in a single meta robots tag, separated by a comma:

  • noindex — page should not be indexed
  • nofollow — links on the page should not be followed
  • follow — links on the page should be followed, even if the page is not to be indexed
  • noimageindex — images on the page should not be indexed
  • noarchive — search results should not show a cached version of the page
  • unavailable_after — page should not be indexed beyond a certain date.

Some more resources:

1. Improve your performance on Google Search

Search Console tools and reports help you measure your  site's Search traffic and performance, fix issues and make your site shine in Google Search results

https://search.google.com/search-console/about

2. How to Do Keyword Research for SEO

 https://ahrefs.com/blog/keyword-research/

3. SemRush Page : 

https://www.semrush.com/academy/courses/seo-fundamentals-course-with-greg-gifford/lessons/lesson-1/


4. Make your web pages fast on all devices try https://pagespeed.web.dev/

paste your website index or default url in textbox of this page and explore the performance issues. Also please peek in to this https://developers.google.com/speed

Making Prompts for Profile Web Site

  Prompt: Can you create prompt to craft better draft in a given topic. Response: Sure! Could you please specify the topic for which you...