This Python Tutorial is very well suited for Beginners, and also for experienced programmers with other programming languages like C++ and Java. This specially designed Python tutorial will help you learn Python Programming Language in the most efficient way, with topics from basics to advanced (li...
LIST OF EXERCISES:
1. Program to convert the given temperature from Fahrenheit to Celsius and vice versa depending
upon user’s choice.
2. Program to calculate total marks, percentage and grade of a student. Marks obtained in each of
the five subjects are to be input by user. Assign grades according to the following criteria:
Grade A: Percentage >=80 Grade B: Percentage >=70 and <80
Grade C: Percentage >=60 and <70 Grade D: Percentage >=40 and <60
Grade E: Percentage <40
3. Program, to find the area of rectangle, square, circle and triangle by accepting suitable input
parameters from user.
4. Program to display the first n terms of Fibonacci series.
5. Program to find factorial of the given number using recursive function.
6. Write a Python program to count the number of even and odd numbers from array of N
numbers.
7. Python function that accepts a string and calculate the number of upper case letters and lower
case letters.
8. Python program to reverse a given string and check whether the give string is palindrome or
not.
9. Write a program to find sum of all items in a dictionary.
10. Write a Python program to construct the following pattern, using a nested loop
1
22
333
4444
55555
666666
7777777
88888888
999999999
11. Read a file content and copy only the contents at odd lines into a new file.
12. Create a Turtle graphics window with specific size.
13. Write a Python program for Towers of Hanoi using recursion
14. Create a menu driven Python program with a dictionary for words and their meanings.
15. Devise a Python program to implement the Hangman Game.
,1. Program to convert the given temperature from Fahrenheit to Celsius and vice versa depending
upon user’s choice.
print("This program will convert temperatures (Fahrenheit / Celsius)")
print("Enter (F) to convert Fahrenheit to Celsius")
print("Enter (C) to convert Celsius to Fahrenheit" )
wh=input('enter selection')
temp=int(input("Enter temperature to convert:"))
if wh=='F':
converted_temp=(temp-32)*5/9
print(temp,'degree Fehrenheit equals',converted_temp,'degrees Celsius')
else:
converted_temp=(9/5 * temp)+32
print(temp,'degrees Celsius equals',converted_temp,'degrees Fahranheit')
, 2. Program to calculate total marks, percentage and grade of a student. Marks obtained in each of
the five subjects are to be input by user. Assign grades according to the following criteria:
Grade A: Percentage >=80 Grade B: Percentage >=70 and <80
Grade C: Percentage >=60 and <70 Grade D: Percentage >=40 and <60
Grade E: Percentage <40
# Python Program to find Student Grade
english = float(input(" Please enter English Marks: "))
math = float(input(" Please enter Math score: "))
computers = float(input(" Please enter Computer Marks: "))
physics = float(input(" Please enter Physics Marks: "))
chemistry = float(input(" Please enter Chemistry Marks: "))
total = english + math + computers + physics + chemistry
avg = (total / 500) * 100
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller sushilravi123. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $4.79. You're not tied to anything after your purchase.