top of page
VR Goggles

Programming with Python

01

Write a program to purposefully raise an Indentation Error and correct it.
 


Download: Click here

03

Write a program that takes two numbers as command line arguments and prints its sum.

Download:
Click here

05

Using a for loop, write a program that prints out the decimal equivalents of 1/2, 1/3, 1/4, and 1/10.


Download: Click here

07

Write a program using a while loop that asks the user for a number, and prints a countdown from that number to zero

Download:
Click here

09

Write a program to find N Fibonacci terms, where N is given by the user.


Download:
Click here

11

Write a program to count the number of characters in the string and store them in a dictionary data structure.

Download:
Click here

13

Write a program combining lists that combines these lists into a dictionary.



Download:
Click here

15

Write a program to print each line of a file in reverse order.

Download:
Click here

17

Write a function ball_collide that takes two balls as parameters and computes if they are colliding. Your function should return a boolean representing whether or not the balls are colliding.

Download:
Click here

Hint: represent a ball on a plane as a tuple of (x,y,r), r being the radius. if "distance between two ball centers" <= "sum of their radii" then they are colliding.
 

19

Write a function nearly_equal to test whether two strings are nearly equal. Two strings A and B are nearly equal when A can be generated by a single mutation on B.

Download:
Click here

02

Write a program to compute the distance between two points taking input from the user.


Download: Click here

04

Write a program for checking whether the given number is an even number or not.

Download:
Click here

06

Write a program using a for loop over a sequence. what is the sequence?
 


Download: Click here

08

Find the sum of all the prime numbers below two million.


Download:
Click here

10

Using the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms.

Download:
Click here

12

Write a program to use split and join methods in the string and trace a birthday with a dictionary data structure.

Download:
Click here

14

Write a program to count the frequency of characters in a given file. Can you use character frequency to tell whether the given file is a Python file, C file, or Text file?

Download:
Click here

16

Write a program to compute the number of characters, words, and lines in a file.

Download:
Click here

18

Find the mean, median, and mode for the given set of numbers in a list.




Download:
Click here





 

20

Write a function dups to find all duplicates in a list.



Download:
Click here

bottom of page