HW#1
HW#1
Homework Assignment #1
Due: 10/3 00:00:00
In this homework assignment, you will practice the basic concepts of input, branching,
conditional, and iterations. As you have learned all the related knowledge during the
lectures (if, while, and for).
Please use “input” function that asks users to type in three integers {𝑥, 𝑦, 𝑧} and print
the largest odd number among them. If none of them are odd, print “no odd number”.
Let 𝑠1 be a string that contains words and random characters. Let 𝑠2 be a string that
is a word, e.g., 𝑠1 = "fapplejdsjapplefdn", 𝑠2 = "apple". Please write a program that
prints how many times of 𝑠2 repeats in 𝑠1 .
You are NOT allowed to import any additional module in this home work!!!
Hand in procedure:
As we had mentioned in the lecture, you should list all your collaborators in your
programs. Here is the template:
Please save your code as a “.py” file, where the file name should follow this format:
111A_hw#1_ID.py
For example,
111A_hw#1_0180506.py
Please be aware. We are not going to accept any homework file with wrong file
name or without signature. Please double check the content of your file.
Once you have accomplished your works, you can upload your homework to the
“E3@NYCU” system. There will be a section for uploading your homework.